[R] Handling dates
Thomas Lumley
tlumley at u.washington.edu
Fri Aug 19 18:15:35 CEST 2005
On Fri, 19 Aug 2005, [iso-8859-1] Göran Broström wrote:
>
> Similar strange results appear in other date-related functions. I plan to
> write functions that converts, eg, "1977-01-31" to the real number 1977.084
> and back. What function in R does what 'mdy.date' claims to do?
>
Well, mdy.date does (the result *prints* as a date, but works in numerical
operations). Eg
> 1970+ mdy.date(12,1,1977)/365.25
[1] 1987.916
-thomas
More information about the R-help
mailing list