[R] Count observation based on hour

arun
Wed, 05 Feb 2014 15:59:49 -0000

Hi,
Try:

data.frame(table(dat$Date))
A.K.


Hi guys, I have some 20,000 observations like this:
? ? ? ? ? Date ? ? ?
2014-01-01 00:00:00
2014-01-02 11:00:00
2014-01-02 22:00:00
2014-01-03 03:00:00

I want to perform an hourly count (e.g. the frequency occur at
each hour for a specific date) so the result would look like this:

? ? ? ? ? Date ? ? ? ? ? ? ? ? ? ?Frequency
2014-01-01 00:00:00 ? ? ? ? ? ? 1
2014-01-01 01:00:00 ? ? ? ? ? ? 1
2014-01-01 02:00:00 ? ? ? ? ? ? 1
2014-01-01 03:00:00 ? ? ? ? ? ? 1

Any suggestions? ?Thanks!