Element-wise mean over list of matrices [duplicate]

You can use:

Reduce("+", my.list) / length(my.list)

According to comments, you want both mean and sd implemented on a list of matrices, and the above ways will not work smoothly for sd. Try this instead :

apply(simplify2array(my.list), 1:2, mean)
apply(simplify2array(my.list), 1:2, sd)

Leave a Comment