-
Notifications
You must be signed in to change notification settings - Fork 215
Closed
Description
As of version 1.6.0, ceiling_date stopped working if the vector contains NA and unit minute, hour, or day (used to work in 1.5.6)
library(lubridate)
dates <- c("02/27/92", "02/27/92", "01/14/92", "02/28/92", "02/01/92")
times <- c("23:03:20", "22:29:56", "01:03:30", "18:21:03", "16:56:26")
x <- paste(dates, times)
times <- strptime(x, "%m/%d/%y %H:%M:%S")
times[2] <- NA
floor_date(times, unit="day") # works fine
ceiling_date(times, unit="day") # breaksError in `[<-.POSIXlt`(`*tmp*`, not_same, value = c(699231600, NA, 695430000, :
NAs are not allowed in subscripted assignments
These are the offending lines in round.R (if new or new1 contain NA):
not_same <- new1 != new
new1[not_same] <- new1[not_same] + deltaReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels