我无法使用xyplot绘制多个时间序列。可能与数据点数量的差异有关?
dim(no_na2[no_na2$weektype=="weekend",])
# [1] 4032 5
dim(no_na2[no_na2$weektype=="weekday",])
# [1] 11232 5
scales ==“免费”无效。是否会有某种类型的轴调整?
xyplot((int_avg~x|weektype), data=no_na2, type="l", xlab="Interval", ylab="Steps")
我得到的是:
我没有第一个出现。
可复制的示例:
int <- c(0, 5, 10, 15, 20, 0, 5, 10, 15, 20)
weektype <- c("weekday", "weekday", "weekday", "weekday", "weekday", "weekday", "weekday", "weekday", "weekend", "weekend")
steps <- c(0, 0, 1, 2, 3, 6, 2, 4, 3, 2)
data.frame(weektype, steps, int)
xyplot(steps~unique(int)|weektype, data=ex1, type="l", xlab="Interval", ylab="Steps")
我试图做一个时间序列图:https://imgur.com/a/kszyuxj
我从int而不是unique(int)获得的内容:https://imgur.com/a/UhN9ki2