[R] library which convert dates

Jim Lemon jim at bitwrit.com.au
Thu Apr 30 13:43:02 CEST 2009


Grześ wrote:
> I'm looking for library  which let mi convert dates
>
> for example like this:
> 00-06-05 00:00
> 00-08-06 00:00
> 00-08-16 00:00
> 00-05-23 00:00
> 00-01-14 00:00
> 00-10-28 00:00
>
> and as a result I want to get a 3 levels
>   
Hi Gregorio,
I might be wildly wrong, but I think you want to read in dates like this:

mydatestrings<-c("00-06-05 00:00",...)
mydates<-strftime(mydatestrings,format=%y-%m-%d %H:%M)
myresult<-cut(mydates,breaks=3)

to get the year 2000 divided into thirds. Feel free to ignore this if I 
am wildly wrong.

Jim




More information about the R-help mailing list