[R] Smart way to sum a column in a matrix across all members in a list

R_help Help rhelpacc at gmail.com
Wed Aug 12 04:05:15 CEST 2009


Hi,

I have a list that contains about 100 elements. Each element contains
the following matrix structure

  a b
1 1 4
2 2 5
3 3 6

I'd like to sum column b across all elements. I'm thinking of using
lapply or sapply but cannot get it to work. Any help would be really
appreciated. Thank you.

adschai




More information about the R-help mailing list