[R] sum of list elements

Ivo Shterev idc318 at yahoo.com
Fri Jul 3 04:20:16 CEST 2009


Dear All,

Is there an automatic way to sum the elements of a list?
For example given a = list(diag(3), diag(3), diag(3)) to obtain b=a[1]+a[2]+a[3].

Thanks
Ivo




More information about the R-help mailing list