[R] How to group a count
Deepayan Sarkar
deepayan.sarkar at gmail.com
Tue May 15 23:46:17 CEST 2007
On 5/15/07, Spilak,Jacqueline [Edm] <Jacqueline.Spilak at ec.gc.ca> wrote:
> Hello R users
> I have a dataset that has different types of records with different
> dates and times pertaining to each. I would like to have a bar graph of
> a count of the types(ie. The number of types) of recods by hour grouped
> by year. So the count of the types would be the y axis, the hour on the
> x axis and then grouped by year for easy comparison. I think that I
> have to use barchart however I don't know how to get barchart to do a
> count and not graph values.
I think you want to use table or xtabs to get a frequency table, and
use barchart on the result. Hard to say more without an example.
-Deepayan
More information about the R-help
mailing list