Re: [R] date format

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Thu 11 Aug 2005 - 10:36:28 EST

Small point but since:

we could modify that to:

        as.Date(paste(d, 15, sep = "-"))

On 8/10/05, bogdan romocea <br44114@gmail.com> wrote:
> 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
>



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 10:41:06 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:13:13 EST