Learn R Programming

crunch (version 1.30.4)

margin-translation: Convert from user margins to real cube margins or vice versa

Description

It is helpful to programmatically move from user-specified margins to real cube margins that apply to the higher-dimensional real cube (with user2realMargin). Or to move from the higher-dimensional real cube to user cube (with real2userMargin).

Usage

user2realMargin(margin, dimTypes = getDimTypes(cube), cube)

real2userMargin(margin, dimTypes = getDimTypes(cube), cube, dedupe = TRUE)

Value

margin or margins in the higher-dimension real cube

Arguments

margin

the margin or margins for the user cube to be translated

dimTypes

dimension types from getDimTypes() (by default: getDimTypes(cube))

cube

the cube to translate the margin for (optional if dimTypes is explicitly supplied)

dedupe

logical, should the user dimensions in the result be deduplicated (for real2userMargin only)