I want to add a new column to my dataframe based on a time interval. For the time 10:00 - 15:00 I want to add "day" in the new column, for 22:00-03:00 I want to add "night". Additionally I want to exclude all rows which aren't in one of the intervals
I've used as.POSIXct already.
This is what I want:
hour D_N
10:31 day
01:10 night
12:03 day
14:51 day