I am trying to subset dates, such as here:
df <- data.frame(
paste0("ID", rep(1:5)),
c("8/1/2019", "9/1/2019", "10/1/2019", "11/1/2019", "12/1/2019"))
names(df) <- c("ID", "dates")
df[as.POSIXct(strptime(df$dates, "%m/%d/%Y")) <
as.POSIXct("10/1/2019", "%m/%d/%Y"), ]
But I get the following warnings:
1: In strptime(xx, f, tz = tz) : unknown timezone '%m/%d/%Y'
2: In as.POSIXct.POSIXlt(x) : unknown timezone '%m/%d/%Y'
I ran these commands regularly in the past and not had this issue till now. It started on December 31st, so possibly the new year/new decade is the cause, but I am not certain.
I tried setting the timezone manually as recommended in this post, I also updated from v. 3.5.3 to 3.6.2. Neither fixed the issue.
Any insight into what's going on here?