Re: [R] date format

From: bogdan romocea <br44114_at_gmail.com>
Date: Thu 11 Aug 2005 - 00:20:56 EST


You need the day to convert to a date format. Assuming day=15: x.date <- as.Date(paste(as.character(x),"-15",sep=""),format="%Y-%m-%d")

> -----Original Message-----
> From: alessandro carletti [mailto:alxmilton@yahoo.it]
> Sent: Wednesday, August 10, 2005 9:37 AM
> To: rHELP
> Subject: [R] date format
>
>
> Hi,
> I have a problem with a vector (x) containing dates in
> format "yyyy-mm" (I'm working with monthly means): how
> can I convert it in date format, so that I can plot it
> recognising trends for my variables?
> class(x) says: factor
> Thanks
> Alex
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Aug 11 00:25:24 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:45 EST