[R-SIG-Mac]Date conversion problems
Don MacQueen
macq@llnl.gov
Mon, 3 Feb 2003 07:10:21 -0800
Try format="%m/%d/%Y"
The help pages are pretty good, and the examples in ?strptime show
something quite similar to your case.
Vol. 1/2 of R News (available at the R website) has the article that
introduced the POSIXt classes.
-Don
>Hello,
>I have a data set with dates stored as a factor with levels coded as, for
>example "01/03/1996"
>
>I tried the following:
>
>onset <- strptime(as.character(cf$dx.dt), format="%m%d%Y")
>
>where cf$dx.dt are the dates in the data frame cf. For output, I get NA
>for every entry. If it matters, I'm running the fink version of R 1.6.1
>on a powerbook G4 with OS 10.2.2.
>
>I have little experience dealing with dates in R. Is there a reference
>that discusses the general issues?
>
>Any help would be much appreciated.
>Thanks,
>John
>
>--
>John Carew <jcarew@stat.wisc.edu>
>Department of Statistics
>University of Wisconsin--Madison
>http://www.stat.wisc.edu/~jcarew
>
>_______________________________________________
>R-SIG-Mac mailing list
>R-SIG-Mac@stat.math.ethz.ch
>http://www.stat.math.ethz.ch/mailman/listinfo/r-sig-mac
--
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
--------------------------------------