Re: [R] Handling dates

From: Thomas Lumley <tlumley_at_u.washington.edu>
Date: Sat 20 Aug 2005 - 02:15:35 EST

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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Aug 20 02:20:48 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:34:37 EST