MeanListDim | R Documentation |
Averages an array along a set of dimensions given by the argument dims.
MeanListDim(var, dims, narm = TRUE)
var |
Input array. |
dims |
List of dimensions to average along. |
narm |
Ignore NA (TRUE) values or not (FALSE). |
The averaged array, with the dimensions specified in dims
removed.
History:
0.1 - 2011-04 (V. Guemas) - Original code
1.0 - 2013-09 (N. Manubens) - Formatting to R CRAN
1.1 - 2015-03 (N. Manubens) - Improved memory usage
a <- array(rnorm(24), dim = c(2, 3, 4)) print(a) print(Mean1Dim(a, 2)) print(MeanListDim(a, c(2, 3)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.