I have a data frame that contains a column "Depart". This column is POSIXct/POSIXt and has the following format : "2022-09-21 17:00:00". I am trying to create a case_when() that will check each row and return a value if the time is before 5PM.
Something like this:
time_flag_df <- my_df %>% mutate(my_column = case_when(Depart < 5pm ~ "Y" )
ideally this would mutate a new column containing my "Y" flags.
Thanks!