I am struggling with the following example
time = c(\'2013-01-03 21:59:21.549\', \'2013-01-04 22:00:21.549\', \'2013-01-05 22:01:21.222\', \'2013-01-06 22:06
I guess this solves your problem:
library(dplyr) result <- data %>% mutate(time2 = format(time, format="%H:%M:%S")) %>% filter(time2 >= "21:59:00" & time2 < "22:02:00") %>% select(-time2)