Re: [R] Summary information by groups programming assitance

2008-12-22 Thread Gabor Grothendieck
D) >> USGS Montana Cooperative Fishery Research Unit >> Montana State University >> P.O. Box 173460 >> Bozeman, MT 59717-3460 >> >> phone: (406) 994-6643 >> fax: (406) 994-7479 >> >> http://studentweb.montana.edu/steven.ranney >> >&

Re: [R] Summary information by groups programming assitance

2008-12-22 Thread Gabor Grothendieck
ey > > > From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com] > Sent: Mon 12/22/2008 5:15 PM > To: Ranney, Steven > Cc: r-help@r-project.org > Subject: Re: [R] Summary information by groups programming assitance > > > Here are two s

Re: [R] Summary information by groups programming assitance

2008-12-22 Thread hadley wickham
On Mon, Dec 22, 2008 at 7:15 PM, Ranney, Steven wrote: > Thank you all for your help. I appreciate the assistance. I'm thinking I > should have been more specific in my original question. > > Unless I'm mistaken, all of the suggestions so far have been for maximum vol > and maximum Length by La

Re: [R] Summary information by groups programming assitance

2008-12-22 Thread Ranney, Steven
8 5:15 PM To: Ranney, Steven Cc: r-help@r-project.org Subject: Re: [R] Summary information by groups programming assitance Here are two solutions assuming DF is your data frame: # 1. aggregate is in the base of R aggregate(DF[c("Length", "vol")], DF[c("Lake", "

Re: [R] Summary information by groups programming assitance

2008-12-22 Thread Gabor Grothendieck
Here are two solutions assuming DF is your data frame: # 1. aggregate is in the base of R aggregate(DF[c("Length", "vol")], DF[c("Lake", "psd")], max) or the following which is the same except it labels psd as Category: aggregate(DF[c("Length", "vol")], with(DF, list(Lake = Lake, Category = psd

Re: [R] Summary information by groups programming assitance

2008-12-22 Thread William Revelle
Yet another suggestion is describe.by in the psych package. At 11:25 PM +0100 12/22/08, Søren Højsgaard wrote: Maybe summaryBy (or lapplyBy/splitBy) in the doBy package might help you. Regards Søren Fra: r-help-boun...@r-project.org på vegne af Ranney, Steven S

Re: [R] Summary information by groups programming assitance

2008-12-22 Thread Søren Højsgaard
Maybe summaryBy (or lapplyBy/splitBy) in the doBy package might help you. Regards Søren Fra: r-help-boun...@r-project.org på vegne af Ranney, Steven Sendt: ma 22-12-2008 22:51 Til: r-help@r-project.org Emne: [R] Summary information by groups programming assitance

Re: [R] Summary information by groups programming assitance

2008-12-22 Thread hadley wickham
On Mon, Dec 22, 2008 at 3:51 PM, Ranney, Steven wrote: > All - > > I have data that looks like > > psd Species Lake Length WeightSt.weightWr > Wr.1 vol > 432 substock SMB Clear150 41.00 0.01 95.12438 > 95.10118 0.0105 > 433 substock SMB Clea