Re: [R] summing and combining rows

2012-08-08 Thread arun
PM Subject: Re: [R] summing and combining rows ok, so it looks like aggregate lists them separately unless everything in the 2 rows matches. Below, we have 2 plots where the density is different in Class3 than Class4, and these are not summed. Is that your understanding? Thanks for your help

Re: [R] summing and combining rows

2012-08-08 Thread arun
ype,data=dat2,sum)   Data LatCat Elevation    Type Stems 1  VTM   Lat6   500 Conifer 0 2  VTM   Lat6   900 Conifer 3 3  VTM   Lat6  1500 Conifer 5 A.K. - Original Message - From: Christopher R. Dolanc To: arun Cc: Sent: Wednesday, August 8, 2012 2:00 PM Subject

Re: [R] summing and combining rows

2012-08-07 Thread arun
 dat3<-dat3[,c(1:3,5,4)]  dat3 #  Plot Elevation  Area SizeClass Stems #1   12  1200 132.4   Class34 1 #2   17  2320 209.1   Class34 8 A.K. - Original Message - From: Christopher R. Dolanc To: arun Cc: Sent: Tuesday, August 7, 2012 5:47 PM Subject: Re: [R]

Re: [R] summing and combining rows

2012-08-07 Thread arun
ass4 values separately. A.K. - Original Message - From: Christopher R. Dolanc To: arun Cc: Sent: Tuesday, August 7, 2012 6:38 PM Subject: Re: [R] summing and combining rows Hmmm. It looks like it's only giving me the values for Class3, instead of summing, which is why I thought the "

Re: [R] summing and combining rows

2012-08-07 Thread R. Michael Weylandt
On Tue, Aug 7, 2012 at 12:47 PM, Christopher R. Dolanc wrote: > Hello, > > I have a data set that needs to be combined so that rows are summed by a > group based on a certain variable. I'm pretty sure rowsum() or rowsums() can > do this but it's difficult for me to figure out how it will work for

[R] summing and combining rows

2012-08-07 Thread Christopher R. Dolanc
Hello, I have a data set that needs to be combined so that rows are summed by a group based on a certain variable. I'm pretty sure rowsum() or rowsums() can do this but it's difficult for me to figure out how it will work for my data based on the examples I've read. My data are structured li