I have an irregular(?) time series data points in a day as following
Jun 5, 2012 10:58 AM
Jun 5, 2012 10:58 AM
Jun 5, 2012 11:59 AM
Jun 5, 2012 12:25 PM
Jun 5, 2012 1:07 PM
Jun 5, 2012 1:07 PM
Jun 5, 2012 1:17 PM
...
I would like to make a histogram where the x is the interval of hours from 0 hour to 23 and y is the count of the data points in each bin.
I was trying to do this in R and Excel by converting the data above into hour:minute format and then draw histograms.
Two challenges I faced:
- How do I convert the data such as above into the standard time format where applications such as Excel or R can handle? is there such functions in each program?
- How do you make histogram with such transformed data?
I tried using zoo packages, as.POSITlt functions, but I am lost.
have at look at the chron and lubridate packages