Dear list,

I have a list of three matrices :

i = list(matrix(1:4,2,2), matrix(3:6,2,2), matrix(9:12,2,2))

I would like to sum the matrices, as follows :

[,1] [,2]
[1,] 13 19
[2,] 16 22

I used this code :

k <- i[[1]]
for (j in (2:length(i))) {
k <- k + i[[j]]}

But, is it possible to sum without a loop ?

Thanks in advance,
Carlos

	[[alternative HTML version deleted]]

