[R] Strange behaviour of as.POSIXct
Don MacQueen
macq at llnl.gov
Tue May 27 04:09:49 CEST 2008
I don't suppose April 4 happens to be the date when "daylight savings
time" began in 2004?
In which case 2:00 AM is a time that doesn't exist ("spring forward" at 02:00)
-Don
At 5:48 PM -0400 5/26/08, Josephy, Norman wrote:
>Hi:
>
>I do not understand the returned value of NA in the following, which
>is a simplified version of
>my attempt to convert the start column of the data frame AirQual in
>the SwissAir package.
>
>as.POSIXct(paste('04.04.2004 0',0:3,sep=''),format='%d.%m.%Y %H')
>[1] "2004-04-04 00:00:00 EST" "2004-04-04 01:00:00 EST"
>[3] NA "2004-04-04 03:00:00 EDT"
>
>My sessionInfo() is
>
> sessionInfo()
>R version 2.7.0 (2008-04-22)
>i386-pc-mingw32
>locale:
>LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
>States.1252;LC_MONETARY=English_United
>States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
>attached base packages:
>[1] stats graphics grDevices utils datasets methods
>[7] base
>
>Thank you,
>
>Norm
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
--
---------------------------------
Don MacQueen
Lawrence Livermore National Laboratory
Livermore, CA, USA
925-423-1062
macq at llnl.gov
More information about the R-help
mailing list