avgDims: Collapse data in array format across specific dimensions

Description Usage Arguments Value

View source: R/array_general.R

Description

avgDims collapses data in array format across specific dimensions by simple averaging

Usage

1
avgDims(dat, dims, na_rm = TRUE)

Arguments

dat

matrix or array to average

dims

character vector of dimension names or numeric vector of dimension indices across which averaging should occur. If character vector, dat must have named dimnames.

na_rm

logical variable; if TRUE (default), missing values are removed before averaging

Value

An array (or matrix) with averaged data (the number of dimensions of dat is decreased by the length of dims)


tdeenes/eegR documentation built on April 19, 2021, 4:17 p.m.