【发布时间】:2016-08-02 08:58:43
【问题描述】:
我创建了以下时间序列
t = seq(as.POSIXct('2014-12-05 10:01:00'), length.out = 4, by = 'mins')
x = c(1,3,4,2)
y = as.ts(x,t)
当我尝试查看(在图中)我的时间序列时,时间标签不是我在 t 中输入的值。
plot(y)
time(y)
[1] 1 2 3 4
我该如何解决?
【问题讨论】:
-
一种方法是改用
xts类:library(xts); y <- xts(x,t)
标签: r time-series