I have a vector of POSIXct objects, I would like to determine the first and the last date/time value in the list.
POSIXct_vector <- read.csv(file="data", as.is=TRUE)
POSIXct_vector$DateTime <- as.POSIXct(POSIXct_vector)
#returns NA
min(POSIXct_vector$DateTime)
#returns NA
max(POSIXct_vector$DateTime)
I suspect you need to add the
na.rm=TRUEargument to your commands. This also means that at least one of the elements of your vector hasn’t been resolved to a valid time. You can also userangeto give the limits in one command.