I have time data for departures and arrivals of birds (e.g. arrival 17:23:54). I would like to bin the data into 2 hour time bins (e.g. 0:00:00-1:59:59...etc), so 12 total bins. The data would eventually go into a bar graph with time bins on the x axis and count on the y axis. Would package package ‘binr’ be my best bet?
Thanks
Just use
?cut
as it has a method for?cut.POSIXt
date/times. E.g.:If your data are just strings, then you need to do a conversion first. Times will end up assigned to the current day if you don't specify a particular day as well.