Filtering time based on time range
I am trying to filter a data frame in R based on time intervals. For example, if I wanted to select rows that the Time was within the time interval, 12:00am to 5:59am. I've tried using the interval () within lubridate package such as interval1<-lubridate::interval(as.hms("12:00:00"), as.hms("5:59:00")), but I get:
1970-01-01 12:00:00 UTC--1970-01-01 05:59:00 UTC
I want the interval, but without the date. Is there a way to do this just by the time?
DATE TIME
2016-05-09 17:03:00
2016-05-09 5:59:00
2016-05-15 19:15:00
2016-10-28 22:10:00
2016-10-28 12:10:00
Thanks in advance!
• 59 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Hello camachofrancine!
We believe that this post does not fit the main topic of this site.
Not related to bioinformatics
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!