每10秒钟的时间序列数据

时间:2017-06-04 16:09:58

标签: r time-series timeserieschart

传感器每10秒收集一次数据。此系列的开始时间为2016-04-01T00:00:13,结束时间为2017-04-30T23:56:58。这意味着将近一年。该文件包含两列“DateTimeStamp”和“data”。 所以,我在R工具中使用以下频率:

sc<-read.csv(file="Temper4One.csv", stringsAsFactors=FALSE, header=F)
sc$V1<-as.POSIXct(sc$V1,format="%Y-%m-%dT%H:%M:%S", tz= "CET") 
sc_xts<-xts(sc$V2,order.by=as.POSIXct(sc$V1,format="%Y-%m-%dT%H:%M:%S", tz= "CET"))
sc.ts=ts(as.numeric(sc_xts), start=c(2016,1), end=c(2017,1), frequency = 24*6*365)

我很困惑它是否正确?

我在下面使用了ACF功能:

acf(sc.ts, lag=40)

enter image description here

我想了解为什么滞后(在x轴上)非常小。

更新1: dput(sc [1:20,])的输出是:

> dput(sc[1:20, ])
structure(list(V1 = structure(c(1459461613, 1459462217, 1459462821, 
1459463424, 1459464028, 1459464633, 1459465234, 1459465841, 1459466445, 
1459467048, 1459467654, 1459468258, 1459469032, 1459469636, 1459470243, 
1459470844, 1459471447, 1459472052, 1459472657, 1459473260), class = c("POSIXct", 
"POSIXt"), tzone = "CET"), V2 = c(14.5423058159053, 14.458881293279, 
14.2091612741173, 14.458881293279, 14.375549570652, 14.7931443820062, 
14.7094365363843, 14.8769483232661, 14.7094365363843, 14.5423058159053, 
14.375549570652, 14.375549570652, 14.5423058159053, 14.6258239563275, 
14.458881293279, 14.6258239563275, 14.5423058159053, 14.2923098342188, 
14.2091612741173, 13.8774627350418)), .Names = c("V1", "V2"), row.names = c(NA, 
20L), class = "data.frame")

0 个答案:

没有答案