Learn R Programming

crunch (version 1.24.0)

skipMissingCategories: Handle missing categories in CrunchCube

Description

By default we don't display missing categories. The result is that when the user subsets a cube with a missing category, we need to translate that subset to only refer to the non-missing categories. This occurs if cube@useNA is set to "no". It can also occur if useNA = "ifAny" and there are no non-0 missing categories This function handles this behavior by translating the user supplied indices to logical vectors which accounts for the missing values.

Usage

skipMissingCategories(cube, index)

Arguments

cube

a CrunchCube

index

a index of the real cube which was generated by translateCubeIndex()

Value

A list of logical vectors