[R] Aggregating the matrices

2010-09-06 Thread Sergey Goriatchev
Hello everyone. Say we have the following: a - matrix(c(-75, 3, 5, 9, 2, 3, 5), nrow=1, dim=list(06092010, c(ES, PT, Z , CF, GX, ST, EO))) b - matrix(c(-5, 2, 4, 12, 5), nrow=1, dim=list(06092010, c(PT, CF, AT, EM, ST))) d - cbind(a, b) I want to calculate sums of the columns that have similar

Re: [R] Aggregating the matrices

2010-09-06 Thread Gabor Grothendieck
On Mon, Sep 6, 2010 at 9:56 AM, Sergey Goriatchev serg...@gmail.com wrote: Hello everyone. Say we have the following: a - matrix(c(-75, 3, 5, 9, 2, 3, 5), nrow=1, dim=list(06092010, c(ES, PT, Z , CF, GX, ST, EO))) b - matrix(c(-5, 2, 4, 12, 5), nrow=1, dim=list(06092010, c(PT, CF, AT, EM,

Re: [R] Aggregating the matrices

2010-09-06 Thread David Winsemius
On Sep 6, 2010, at 9:56 AM, Sergey Goriatchev wrote: Hello everyone. Say we have the following: a - matrix(c(-75, 3, 5, 9, 2, 3, 5), nrow=1, dim=list(06092010, c(ES, PT, Z , CF, GX, ST, EO))) b - matrix(c(-5, 2, 4, 12, 5), nrow=1, dim=list(06092010, c(PT, CF, AT, EM, ST))) d - cbind(a, b) I

Re: [R] Aggregating the matrices

2010-09-06 Thread Sergey Goriatchev
Gabor, David, thank you. David, your last suggestion is what I need. Regards, Sergey On Mon, Sep 6, 2010 at 16:12, David Winsemius dwinsem...@comcast.net wrote: On Sep 6, 2010, at 9:56 AM, Sergey Goriatchev wrote: Hello everyone. Say we have the following: a - matrix(c(-75, 3, 5, 9, 2,