summary_list_mean | R Documentation |
For a list of matrices \{ X^{(1)}, …, X^{(L)} \}, all of the same dimension, this function computes the matrix \bar{X} with i,j entry \bar{X}_{i,j} = \frac{1}{L}∑_{ l=1 }^{L} X_{ i,j }^{(l)} . This function does not run any check on the dimensions and uses OpenMP if available.
summary_list_mean(x, n_threads=1)
x |
A list of matrices of the same dimension |
n_threads |
integer number of OpenMP threads. This is ineffective if |
The matrix of mean values.
Michele Peruzzi michele.peruzzi@duke.edu
# make some data into a list set.seed(2021) L <- 200 x <- lapply(1:L, function(i) matrix(runif(300), ncol=3)) mean_done <- summary_list_mean(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.