[R] How to unlist Dates

Rees, David david.rees at citi.com
Tue Oct 23 11:49:03 CEST 2007


Hi,

I am trying to get a vector of dates that I can use for the xaxis in
matplot (e.g. axis.Date(1,dates) )

I have a list of dates ... e.g.

> dates
[[1]]
[1] "2015-02-15"

[[2]]
[1] "2015-08-15"

[[3]]
[1] "2015-11-15"

But when I unlist it I "lose" the Dates and get numbers instead

> unlist(dates)
[1] 16481 16662 16754

Am I doing something wrong using unlist?

Many thanks,
David



More information about the R-help mailing list