In a large data set, I have previously collected date and time columns to one datetime by
mutate(date=as.Date(date))%>%
mutate(time=format(time,format="%H:%M:%S"))%>%
mutate(datetime=ymd_hms(paste(date,time)))
, and worked with this in tidyverse and with lubridate, among other using floor_date(). I have had no issues in this; R has recognised what was hours, minutes etc. However, now I want to filter out a few data points based on datetime with e.g.
filter(datetime=="2022-05-24 09:43:00")
but R returns an empty result (“no data available in table”), that is, cannot recognise it. What’s in the “” is directly copied from the R tibble, thus it shouldn’t be a typo. Any idea why this doesn’t work?
Running str() gives me the following:
(Somewhat of a newbie still 🙂 )