更新时间:2023-11-25 23:44:10
您可以使用:
Reduce("+", my.list) / length(my.list)
根据评论,您希望 mean
和 sd
都在矩阵列表上实现,而上述方法对于 sd
无法顺利运行>.试试这个:
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)