[R] Count observation based on hour
arun
smartpink111 at yahoo.com
Wed Feb 5 16:59:49 CET 2014
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!
More information about the R-help
mailing list