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.

Thanks

Adam

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to