[R] sapply and Date objects

Fernando Saldanha fsaldan1 at gmail.com
Sat May 20 17:01:48 CEST 2006


This is probably a dumb question, but I cannot figure it out. Why does
this happen?

 dt <- as.Date("1954-02-01")
> as.character(dt)
[1] "1954-02-01"
> sapply(c(dt), as.character)
[1] "-5813"

Thanks.

FS



More information about the R-help mailing list