Hi R,

 

I have a list of matrices. I need to get the sum of all the matrices in
the list.

 

Example:

a=b=c=d=matrix(1:4,2,2)

l=list(a,b,c,d)

 

 

I need:

> a+b+c+d

     [,1] [,2]

[1,]    4   12

[2,]    8   16

 

Something like do.call("+",l) is not working...why is this?

 

 

I may not be knowing the number of matrices in the list...

 

Thanks, Shubha

 

This e-mail may contain confidential and/or privileged i...{{dropped:13}}

