Skip to content
Prev 304128 / 398503 Next

POSIXct-coerced NA's not considered NA by is.na()

If you are going to convert a column from character to POSIXct, I
would assume that you would do it this way and get the results that
you want:
+     , stringsAsFactors = FALSE
+     )
times
1 2012-08-14 12:00
2 2011-01-04 08:00
3                b
times             newtime
1 2012-08-14 12:00 2012-08-14 12:00:00
2 2011-01-04 08:00 2011-01-04 08:00:00
3                b                <NA>
[1] FALSE FALSE  TRUE

        
On Fri, Aug 24, 2012 at 2:26 PM, Alexander Shenkin <ashenkin at ufl.edu> wrote: