On Sat, Jul 16, 2011 at 11:50 PM, Eduardo M. A. M. Mendes <emammen...@gmail.com> wrote: > 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 >
Set the origin to Matlab's origin like this. Be sure you are using the indicated version of zoo or later: > library(zoo) > packageVersion("zoo") [1] ‘1.7.1’ > as.Date(730456, origin = "0000-00-00") [1] "1999-12-02" -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.