Handling dates
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