crunch (version 1.27.7)

calcTransforms: Calculate transforms for an array

Description

Given an array and transforms calculate values based on the transforms and then return the values calculated that are specified.

Usage

calcTransforms(array, insert_funcs, dim_names = names(insert_funcs))

Arguments

array

the array to use (this is most likely from a CrunchCube`` object). The cells from this array are the cube_cells referred to in include`

trans

a Transform object to get the transformations to calculate

var_cats

a Categories object that are the categories for the variable the transforms are being calculated for

include

what values should be included in the output? (default: "subtotals", "headings", "cube_cells", "other_insertions")

  • cube_cells -- the values from the array given in array

  • subtotals -- insertions that have the function subtotal

  • headings -- insertions that have no function specified

  • other_insertions -- any other insertion that is present in the transforms

Value

an array with transforms calculated and added or applied