我有两个要附加在一起的 data.frames。一个 data.frame 保存过去的数据,另一个 data.frame 保存未来的预测数据。例如:
past <- structure(list(Period = c("2010-01-01", "2010-02-01", "2010-03-01",
"2010-04-01", "2010-05-01", "2010-06-01"), Count = c(3379221317,
3379221317, 3791458246, 4182424930, 4891432401, 5116360744)),
.Names = c("Period", "Count"), row.names = c(NA, 6L), class = "data.frame")
future <- structure(list(Period = structure(c(15522, 15553, 15584, 15614,
15645, 15675), class = "Date"), Count = c(11051746713.9419, 11385578654.4160,
10864084232.2216, 11336164255.3271, 11121729107.9691, 12321341701.3780)),
.Names = c("Period", "Count"), row.names = c(NA, 6L), class = "data.frame")
我使用rbind(past,future)
了,并且出于某种原因,data.frame 中的Period
条目future
都被重命名了。看起来像:
> rbind(past,future)
Period Count
1 2010-01-01 3379221317
2 2010-02-01 3379221317
3 2010-03-01 3791458246
4 2010-04-01 4182424930
5 2010-05-01 4891432401
6 2010-06-01 5116360744
7 15522 11051746714
8 15553 11385578654
9 15584 10864084232
10 15614 11336164255
11 15645 11121729108
12 15675 12321341701
为什么我的日期被重命名为随机数?