Learn R Programming

s2dverification (version 2.4.0)

Mean1Dim: Averages A Matrix Along A Dimension

Description

Averages the matrix var along the posdim dimension between limits [1] and limits [2] if limits argument is provided by the user.

Usage

Mean1Dim(var, posdim, narm = TRUE, limits = NULL)

Arguments

Value

Matrix with one dimension less than the input one containing the average along posdim dimension.

Examples

Run this code
a <- array(rnorm(24), dim = c(2, 3, 4))
print(a)
print(Mean1Dim(a, 2))

Run the code above in your browser using DataLab