[R] frequencies of time series data

Erik Iverson eriki at ccbr.umn.edu
Thu May 13 22:48:58 CEST 2010


Hello,

Adam Sean wrote:
> I have an excel file in following shape:
> 
> date             Category
> 01/21/2010    turf
> 01/21/2010    jack
> 01/21/2010    jack
> 01/22/2010   turf
> 01/22/2010   jack
> 01/22/2010   psi
> 01/22/2010   psi
> 01/22/2010   psi
> 01/23/2010   turf
> 01/23/2010   turf
> 01/23/2010   jack
> 01/23/2010   psi
> 
> 
> I need to output it in following way before plotting all frequencies of all
> categories on y-axis and date on x-axis:
> 
> date            Category freq
> 01/21/2010   turf       1
> 01/21/2010   jack       2
> 01/21/2010   psi         0
> 01/22/2010   turf       1
> 01/22/2010   jack       1
> 01/22/2010   psi         3
> 01/23/2010   turf       2
> 01/23/2010   jack       1
> 01/23/2010   psi         1
> 
> How should I code it? Your help is highly appreciated.

This is not a list for Excel questions.  I'm sure there are plenty of 
lists or forums that can give you Excel help.



More information about the R-help mailing list