crunch (version 1.30.4)

collapse_dims: Collapse an array from a CrunchCube by summing

Description

This is an internal function that powers dimSums()

Usage

collapse_dims(array_in, margins_to_collapse, collapsed_items)

Value

a duly-collapsed array

Arguments

array_in

the array from a CrunchCube to collapse

margins_to_collapse

the margins that should be collapsed

collapsed_items

vector of logicals if any of the dimensions in margins_to_collapse are of the _items type