Hi R-users,

I have a list

a <- list(one=matrix(rnorm(20), 5, 4), two=matrix(rnorm(20, 3, 0.5),5,4))

How to add rowSums (calculated using lapply) to corresponding matrix
in this list

lapply(a, function(x) rowSums(x))

??

-Lauri

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to