Skip to contents

Basal Group

Usage

basal_group(
  value,
  lookup,
  hierarchical_variable,
  nesting_variable,
  encountered_values = character()
)

Arguments

value

Value (e.g., hepatitis-A) of the hierarchical_variable (e.g., disease) for which to determine basal value (e.g., hepatitis).

lookup

Table with two character-valued columns with names given by hierarchical_variable (e.g., disease) and nesting_variable (e.g., nesting_disease).

hierarchical_variable

Name of the hierarchical variable in lookup

nesting_variable

Name of the nesting variable in lookup

encountered_values

Character vector of values already found. Typically this left at the default value of an empty character vector.

Value

The root value that input value maps to in lookup.