Re: [R] help with Date class

2010-07-07 Thread Dirk Eddelbuettel
On Wed, Jul 07, 2010 at 01:25:43PM +0200, Elisenda Vila wrote: > I am trying to work with the Date class which is written in S3 and I would > like to access to the elements of the class (for example the year). I've > tryed to do it for example like this: > > as.Date(Sys.time)->w w <- Sys.Date()

Re: [R] help with Date class

2010-07-07 Thread David Winsemius
On Jul 7, 2010, at 7:25 AM, Elisenda Vila wrote: I am trying to work with the Date class which is written in S3 and I would like to access to the elements of the class (for example the year). I've tryed to do it for example like this: as.Date(Sys.time)->w Throws an error ... since Sys.t

[R] help with Date class

2010-07-07 Thread Elisenda Vila
I am trying to work with the Date class which is written in S3 and I would like to access to the elements of the class (for example the year). I've tryed to do it for example like this: as.Date(Sys.time)->w w$year #Doesn't work w["year"] #is NA I would like to know the correct way to acces to thi