在执行代码时出错
scorecardData <- data.frame(
Date =
c("05/10/2019","06/10/2019","07/10/2019","08/10/2019","09/10/2019"),
Incoming.Calls= c(10,20,15,5,7))
ggplot(data = scorecardData, aes(x = factor(Date), y = Incoming.Calls)) +
geom_line()
正在获取错误消息: geom_path:每个组仅包含一个观测值。你需要调整吗 群体审美?
答案 0 :(得分:0)
您需要设置group = 1
参见here
scorecardData <- data.frame(
Date =
c("05/10/2019","06/10/2019","07/10/2019","08/10/2019","09/10/2019"),
Incoming.Calls= c(10,20,15,5,7))
ggplot(data = scorecardData, aes(x = Date, y = Incoming.Calls, group = 1)) +
geom_line()