Averages An Array Along Multiple Dimensions
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, vguemas@ic3.cat) - Original code
1.0 - 2013-09 (N. Manubens, nicolau.manubens@ic3.cat) - Formatting to R CRAN
1.1 - 2015-03 (N. Manubens, nicolau.manubens@ic3.cat) - Improved memory usage
a <- array(rnorm(24), dim = c(2, 3, 4)) print(a) print(Mean1Dim(a, 2)) print(MeanListDim(a, c(2, 3)))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.