as.Date(10000) works fine in Windows, but on a Linux distribution it errors: 'origin' must be supplied. Somehow the Windows installation has a default origin? I'm trying to build/check a package on Linux that was originally developed on a Windows machine. This package omits the origin parameter all over the place. Is there a quick fix? Perhaps an addition to Rprofile.site?
Load the zoo package. It provides a version of as.Date.numeric with a default origin, e.g.
library(zoo)
as.Date(0)
You must be running an older version of R on your windows machine. as.Date(10000) does not work for me on Windows XP running R-2.13.1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With