Here is my data.  I tried table but it doesn't do what I want it to do
when it graphs.  I want a count of the types (R for one graph and A for
another) by hour grouped by year.  Hope that helps.

ID,YYYY,MM,DD,HH,MM,Type
YEG,2002,01,01,01,24,A
YEG,2002,01,01,02,40,R
YEG,2002,01,01,05,39,R
YEG,2002,01,01,09,17,A 

-----Original Message-----
From: Deepayan Sarkar [mailto:[EMAIL PROTECTED] 
Sent: May 15, 2007 3:46 PM
To: Spilak,Jacqueline [Edm]
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] How to group a count

On 5/15/07, Spilak,Jacqueline [Edm] <[EMAIL PROTECTED]> 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

______________________________________________
R-help@stat.math.ethz.ch 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