Re: [R] Summing rows by years (each time separately)

2012-01-09 Thread Andrew Gaska
Thanks for your answer! There is one thing I could not find in aggregate(): I want to have it a sum for each group of 2008,2009 and 2010. In aggregate() I can sum all the rows that have a rowname 2008, all the rows that have a rowname 2009 and all the rows that have a rowname 2010. But I want

Re: [R] Summing rows by years (each time separately)

2012-01-09 Thread David Winsemius
On Jan 9, 2012, at 9:06 AM, Andrew Gaska wrote: Thanks for your answer! There is one thing I could not find in aggregate(): I want to have it a sum for each group of 2008,2009 and 2010. In aggregate() I can sum all the rows that have a rowname 2008, all the rows that have a rowname 2009

Re: [R] Summing rows by years (each time separately)

2012-01-09 Thread William Dunlap
wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Andrew Gaska Sent: Monday, January 09, 2012 6:07 AM To: r-help@r-project.org Subject: Re: [R] Summing rows by years (each time separately) Thanks for your answer

[R] Summing rows by years (each time separately)

2012-01-08 Thread Andrew Gaska
Dear all, I could not find an answer for the problem. I have a matrix and I want to sum rows in groups i.e. rows are summed as long as rows of column 1 have some value (f.e. 2008 in it), then again rows are summed as long as rows of column 2 have some value (f.e. 2009 in it). In case there is

Re: [R] Summing rows by years (each time separately)

2012-01-08 Thread David Winsemius
On Jan 8, 2012, at 1:57 PM, Andrew Gaska wrote: Dear all, I could not find an answer for the problem. I have a matrix and I want to sum rows in groups i.e. rows are summed as long as rows of column 1 have some value (f.e. 2008 in it), then again rows are summed as long as rows of column

Re: [R] Summing rows by years (each time separately)

2012-01-08 Thread William Dunlap
-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius Sent: Sunday, January 08, 2012 5:36 PM To: Andrew Gaska Cc: r-help@r-project.org Subject: Re: [R] Summing rows by years (each time separately) On Jan 8, 2012, at 1:57 PM, Andrew Gaska wrote

Re: [R] Summing rows by years (each time separately)

2012-01-08 Thread David Winsemius
: Sunday, January 08, 2012 5:36 PM To: Andrew Gaska Cc: r-help@r-project.org Subject: Re: [R] Summing rows by years (each time separately) On Jan 8, 2012, at 1:57 PM, Andrew Gaska wrote: Dear all, I could not find an answer for the problem. I have a matrix and I want to sum rows in groups i.e. rows