sumByDims: Sum array by specified dimensions

View source: R/sumByDims.R

sumByDimsR Documentation

Sum array by specified dimensions

Description

Function to sum array by specified dimensions.

Usage

sumByDims(n, dims = 1)

Arguments

n
  • array to sum

dims
  • vector of indices for dimension to sum by

Details

Uses the apply function to sum over the requested dimension.

Value

array with dimensions used for summing


wStockhausen/wtsUtilities documentation built on March 16, 2024, 10:38 a.m.