I have a data frame, and I'm trying to keep records after 10:05 AM on 1/22/21.
df1$`Date/Time Opened` <- as_datetime(df1$`Date/Time Opened`)
df2 <- df1 %>% filter("Date/Time Opened" > as_datetime("2021-01-22 10:05:00"))
It throws this error when I try to filter:
Error: Problem with `filter()` input `..1`.
x character string is not in a standard unambiguous format
i Input `..1` is `"Date/Time Opened" > as_datetime("2021-01-22 10:05:00")`.
If I use as.numeric(as_datetime("2021-01-22 10:05:00"))
or as.character(as_datetime("2021-01-22 10:05:00"))
it runs without throwing an error, but the filter is not applied correctly. (Either all or none of the records are filtered out.)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…