x=read.table(text=" Qtr1 Qtr2 Qtr3 Qtr4
2010 1.8 8.0 6.0 3.0
2011 2.0 11.0 7.0 3.5
2012 2.5 14.0 8.0 4.2
2013 3.0 15.2 9.5 5.0",
sep="",header=TRUE)
y<-ts(as.vector(as.matrix(x)),frequency=4,start=c(2010,1))
plot.ts(y)
time<-seq(as.Date("2010/1/1"),length.out=20,by="3 months")
axis(1, at = time)
当我绘制图形时,我想在x轴上添加日期,为什么我的axis(1, at = time)
不能将日期数据添加到x轴上呢?