Hello Eric,

strptime("201206",format="%Y%m") gives NA (I don't know why but I'm a
newbie).

The only solution I found is to add "01" as a day to have a complete date
(Year Month Day):
x$Period<-as.Date(paste(x$Period,"01",sep=""),format="%Y%m%d")

Then you get a Date format you can use to plot graph.

I think you will get better solutions from advanced users.
Have a good day,
Ptit Bleu.



--
View this message in context: 
http://r.789695.n4.nabble.com/Creating-dates-to-plot-tp4649695p4649704.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
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