[R] How to convert number (matlab) to date

Eduardo M. A. M. Mendes emammendes at gmail.com
Sun Jul 17 05:50:48 CEST 2011


Hello

I am new to R and I need to convert some dates (numeric format by matlab) to actual dates in R.

For instance,

Matlab -> 730456 -> >> datestr(730456)

ans =

02-Dec-1999

R - 

> library(zoo)
> as.Date(730456)
[1] "3969-12-03"

I don't not mind the output format but it needs to be right.


Many thanks

Ed



More information about the R-help mailing list