collapse_dims {crunch}R Documentation

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

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

Value

a duly-collapsed array


[Package crunch version 1.31.0 Index]