R-Help Users

 

How do I plot "Dates" on the x-axis of a TS plot 

 

>
mydata<-c(575,125,950,5020,2515,565,135,945,5100,2510,580,140,955,5045,2505,
570,135,1000,5005,2520,580,130,925,5000,2525,585,120,960,5025,2520)

> myts<-ts(mydata,start=as.Date("2015-01-01"))

> myts

Time Series:

Start = 16436 

End = 16465 

Frequency = 1 

 [1]  575  125  950 5020 2515  565  135  945 5100 2510  580  140  955 5045
2505

[16]  570  135 1000 5005 2520  580  130  925 5000 2525  585  120  960 5025
2520

> plot.ts(myts)

 

I'm assuming I have to reformat my start date values.  I just assume R would
do that.


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to