I have a variable in the proper POSIXct format, converted with ymd_hms(DateTime) {lubridate}. However, after a transformation the variable loses its POSIXct format:
daily$DateTime<- ifelse(daily$ID %in% "r1_1"|daily$ID %in% "r1_2",
NA,daily$DateTime)
I try to convert the variable again to POSIXct with lubridate, but it seems it does´t like the NAs, and, in addition, now the variable DateTime has a num format that lubridate does´t recognise as a date and time format (e.g. 1377419400).
Please, any help to make the required transformation to convert to NA the DateTime when ID== r1_1 and r1_2??
Thanks