crunch (version 1.27.7)

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)

Arguments

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

array

the array from a CrunchCube to collapse

margins_to_keep

the margins that should be kept

Value

a duly-collapsed array