我是R软件的新手。我的CSV数据包含超过10,000个单位(行)和两个变量(列)。使用数据记录器每20分钟(每天72次)记录数据六个月。这里使用R。
绘制样本数据和dygraphdput(穗)
tzone = "", tclass = c("POSIXct", "POSIXt")), .indexCLASS = c("POSIXct",
"POSIXt"), tclass = c("POSIXct", "POSIXt"), .indexTZ = "", tzone = "", class = c("xts",
"zoo"))
Names = c("Datetime",
"Temp", "RH", "X"), class = "data.frame", row.names = c(NA, -5552L
))
Datetime Temp RH 2014-08-30 8:00 21.6 70.3 2014-08-30 8:20 21.7 69.8 2014-08-30 8:40 22.1 70.3 2014-08-30 9:00 22.5 70.8 2014-08-30 9:20 22.7 70.9 2014-08-30 9:40 23.3 71.5 2014-08-30 10:00 23.4 70.4 2014-08-30 10:20 23.8 71.3 2014-08-30 10:40 24.4 71.6 2014-08-30 11:00 25 71.7 2014-08-30 11:20 25.7 68.2 2014-08-30 11:40 25.8 63.8 2014-08-30 12:00 26.4 63.9 2014-08-30 12:20 27.5 65.1 2014-08-30 12:40 28.1 62.6 2014-08-30 13:00 28.4 61.1 2014-08-30 13:20 28.4 60.1 2014-08-30 13:40 28.2 59.3 2014-08-30 14:00 28 58.3 2014-08-30 14:20 27.6 56.9 2014-08-30 14:40 27.4 57.1 2014-08-30 15:00 27.3 57.3 2014-08-30 15:20 27.4 57.5 2014-08-30 15:40 27.4 57.4 2014-08-30 16:00 27.5 57.2 2014-08-30 16:20 27.6 57.2 2014-08-30 16:40 27.6 57 2014-08-30 17:00 27.5 55.8 2014-08-30 17:20 27.4 55.8 2014-08-30 17:40 27.3 55.4 2014-08-30 18:00 27.2 55.8 2014-08-30 18:20 27.1 55.8 2014-08-30 18:40 27 55.8 2014-08-30 19:00 26.8 55.4 2014-08-30 19:20 26.6 55.6 2014-08-30 19:40 26.5 55.3 2014-08-30 20:00 26.1 54.7 2014-08-30 20:20 25.8 54.5 2014-08-30 20:40 25.5 55.3 2014-08-30 21:00 25.4 55.6 2014-08-30 21:20 25.4 55.9 2014-08-30 21:40 25.4 56.1 2014-08-30 22:00 25.4 56.1 2014-08-30 22:20 24.8 55.9 2014-08-30 22:40 24.3 56.6 2014-08-30 23:00 23.8 57.4 2014-08-30 23:20 23.5 58 2014-08-30 23:40 23.1 58.6 2014-08-31 0:00 22.9 59.2 2014-08-31 0:20 22.6 59.8 2014-08-31 0:40 22.4 60.3 2014-08-31 1:00 22.3 60.8 2014-08-31 1:20 22.1 61.3 2014-08-31 1:40 22 61.7 2014-08-31 2:00 21.8 62.2 2014-08-31 2:20 21.7 62.6 2014-08-31 2:40 21.6 63 2014-08-31 3:00 21.6 63.4 2014-08-31 3:20 21.5 63.7 2014-08-31 3:40 21.4 64 2014-08-31 4:00 21.4 64.4 2014-08-31 4:20 21.3 64.7 2014-08-31 4:40 21.2 65 2014-08-31 5:00 21.2 65.2 2014-08-31 5:20 21.1 65.5 2014-08-31 5:40 21.1 65.8 2014-08-31 6:00 21.1 65.9 2014-08-31 6:20 21 66.2 2014-08-31 6:40 21 66.4 2014-08-31 7:00 21.1 67.3 2014-08-31 7:20 21.2 68.1 2014-08-31 7:40 21.6 67.6 2014-08-31 8:00 21.7 67.9 2014-08-31 8:20 22.1 68.9 2014-08-31 8:40 22.1 67.7 2014-08-31 9:00 22.1 68 2014-08-31 9:20 22.7 70.4 2014-08-31 9:40 24.9 70.6 2014-08-31 10:00 26.2 62.3 2014-08-31 10:20 26.8 62.4 2014-08-31 10:40 27.6 62.4 2014-08-31 11:00 27.8 60.3 2014-08-31 11:20 27.7 58.1 2014-08-31 11:40 27.2 56.4 2014-08-31 12:00 28.8 51.6 2014-08-31 12:20 27.5 54.8 2014-08-31 12:40 27.2 55.6 2014-08-31 13:00 27.9 58.5 2014-08-31 13:20 27.3 58.6 2014-08-31 13:40 27.2 58.4 2014-08-31 14:00 27 59 2014-08-31 14:20 26.7 59.3 2014-08-31 14:40 26.8 59.4 2014-08-31 15:00 26.2 58.2 2014-08-31 15:20 25.6 58.3 2014-08-31 15:40 26 59.6 2014-08-31 16:00 26.8 61.5 2014-08-31 16:20 27.6 61.8 2014-08-31 16:40 27.8 61.2 2014-08-31 17:00 27.7 59.2 2014-08-31 17:20 28.1 59.3 2014-08-31 17:40 28.5 58.4 2014-08-31 18:00 28.5 57.7 2014-08-31 18:20 28.9 57.3 2014-08-31 18:40 29.3 53.3 2014-08-31 19:00 28.6 51.5 2014-08-31 19:20 27.8 51.2 2014-08-31 19:40 27.1 51.5 2014-08-31 20:00 26.6 51.9 2014-08-31 20:20 26.3 53.2 2014-08-31 20:40 25.7 55.2 2014-08-31 21:00 25.2 68.1 2014-08-31 21:20 26 58.1 2014-08-31 21:40 25 58.3 2014-08-31 22:00 24.5 59.1 2014-08-31 22:20 23.8 59.2 2014-08-31 22:40 23.3 59.7 2014-08-31 23:00 22.9 60.3 2014-08-31 23:20 22.6 61.1 2014-08-31 23:40 22.5 61.5 2014-09-01 0:00 22.4 61.9 2014-09-01 0:20 22.3 62.2 2014-09-01 0:40 22.3 62.6 2014-09-01 1:00 22.2 62.9 2014-09-01 1:20 22.2 63.1 2014-09-01 1:40 22.1 63.4 2014-09-01 2:00 22.2 63.8 2014-09-01 2:20 22.2 64.1 2014-09-01 2:40 22.2 64.4 2014-09-01 3:00 22.1 64.7 2014-09-01 3:20 22.1 65 2014-09-01 3:40 22.1 65.4
Preharvest<- read.csv("C:/Users/User/Desktop/Preharvest.csv")
Preharvest1<- as.data.frame(Preharvest , header=True)
library(dygraphs)
library(xts)
s <-xts(Preharvest1[, 2:3], order.by=as.POSIXct(Preharvest1$Datetime))
dygraph(s)
但是,我想让dygraph带有时间序列的部分阴影误差条。这里的样本dygraph是从我想要的互联网上获取的。
是否有人帮助我并根据具有部分阴影的数据的每日平均值来指导使用带有误差线的dygraph?