[R] Date Not Staying in Date Format
David Randel
davidr00 at hotmail.com
Mon Jan 30 21:51:54 CET 2006
I have a column in a data frame that has a class of "Date" and a mode of
"numeric". When I:
max(df$Date)
My output stays in Date format, i.e. "2006-01-03".
However, when I run the following statment:
tapply(df$Date, df$SomeFactor, max)
my output looks like this: 9129 9493 9861 10226 10591 10956 11320
11687 12052 12417
The returned object is of mode "numeric" and class "array". Each array
element is of mode "numeric" and class "numeric". I believe that this is
the integer representation of my date. I can't seem to convert it back to a
date.
How do I get these to be intrepreted as a date instead of a number?
Thanks,
~Dave R.
More information about the R-help
mailing list