[R] is.na() == TRUE for POSIXlt time / date of "2014-03-09 02:00:00"
arun
smartpink111 at yahoo.com
Thu Jul 31 05:49:51 CEST 2014
Not able to reproduce the problem.
str(q)
# POSIXlt[1:1], format: "2014-03-09 02:00:00"
is.na(q)
#[1] FALSE
sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-unknown-linux-gnu (64-bit)
A.K.
On Wednesday, July 30, 2014 1:10 PM, John McKown <john.archie.mckown at gmail.com> wrote:
"I'm so confused!" Why does is.na() report TRUE for a POSIXlt date &
time of 2014-03-09 02:00:00 ?
> q
[1] "2014-03-09 02:00:00"
> is.na(q)
[1] TRUE
> as.POSIXct(q)
[1] NA
> dput(q)
structure(list(sec = 0, min = 0L, hour = 2, mday = 9L, mon = 2L,
year = 114L, wday = 0L, yday = 67L, isdst = 0L, zone = "",
gmtoff = NA_integer_), .Names = c("sec", "min", "hour", "mday",
"mon", "year", "wday", "yday", "isdst", "zone", "gmtoff"), class = c("POSIXlt",
"POSIXt"))
> str(q)
POSIXlt[1:1], format: "2014-03-09 02:00:00"
>
--
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan
Maranatha! <><
John McKown
______________________________________________
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.
More information about the R-help
mailing list