Re: [R] Sum efficiently from large matrix according to re-occuring levels of factor?

2008-07-21 Thread hadley wickham
PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [R] Sum efficiently from large matrix according to re-occuring levels of factor? CC: [EMAIL PROTECTED]; r-help@r-project.org Does this do what you want: # following up on another idea that was presented # where are the breaks dataBreaks - cumsum(c(0

[R] Sum efficiently from large matrix according to re-occuring levels of factor?

2008-07-20 Thread Ralph S.
Hi, I am trying to calculate the sum for each occurrence of the level of a factor in a very large matrix. In addition, I want to save that sum together with the information of the level of the factor and the level of a second factor. My matrix looks like this:

Re: [R] Sum efficiently from large matrix according to re-occuring levels of factor?

2008-07-20 Thread hadley wickham
On Sun, Jul 20, 2008 at 4:16 PM, Ralph S. [EMAIL PROTECTED] wrote: Hi, I am trying to calculate the sum for each occurrence of the level of a factor in a very large matrix. In addition, I want to save that sum together with the information of the level of the factor and the level of a

Re: [R] Sum efficiently from large matrix according to re-occuring levels of factor?

2008-07-20 Thread hadley wickham
On Sun, Jul 20, 2008 at 4:47 PM, hadley wickham [EMAIL PROTECTED] wrote: On Sun, Jul 20, 2008 at 4:16 PM, Ralph S. [EMAIL PROTECTED] wrote: Hi, I am trying to calculate the sum for each occurrence of the level of a factor in a very large matrix. In addition, I want to save that sum together

Re: [R] Sum efficiently from large matrix according to re-occuring levels of factor?

2008-07-20 Thread jim holtman
] To: [EMAIL PROTECTED] Subject: Re: [R] Sum efficiently from large matrix according to re-occuring levels of factor? CC: r-help@r-project.org On Sun, Jul 20, 2008 at 4:47 PM, hadley wickham wrote: On Sun, Jul 20, 2008 at 4:16 PM, Ralph S. wrote: Hi, I am trying to calculate the sum for each

Re: [R] Sum efficiently from large matrix according to re-occuring levels of factor?

2008-07-20 Thread Ralph S.
yes - thank you very much! slowly getting to the full power of R . . . Date: Sun, 20 Jul 2008 21:21:35 -0400 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [R] Sum efficiently from large matrix according to re-occuring levels of factor