replaceCharWithNumeric: Transform character vectors into indices

View source: R/cube-subset.R

replaceCharWithNumericR Documentation

Transform character vectors into indices

Description

When a user supplies character strings to subset a cube, we need to translate it into a numeric index to subset the cube. This function does that as well as some error checking. It is broken out for testing.

Usage

replaceCharWithNumeric(cat_names, idx, visible = TRUE)

Arguments

cat_names

The category names for a given dimension

idx

The index

visible

whether or not a category is visible to the user


Crunch-io/rcrunch documentation built on Sept. 14, 2024, 11:13 p.m.