Set Parameters and Transform Data for a Given Variable
set_var_params.RdConfigures variable-specific parameters and applies necessary transformations to the dataset based on the variable of interest. This includes defining numerator/denominator columns, computing derived metrics when needed, filtering, and restructuring the repository.
Value
A named list containing:
- nice_varname
Human-readable name for the variable
- denominator_variables
Name of the denominator column
- numerator_variables
Name of the numerator column
- percentage_variables
Name of the percentage column (or
NULLif not applicable)- remove_unknown_insecticide
Logical flag indicating whether to exclude unknown insecticide data
- repo
(Optional) Transformed repository
data.framefor HBI and other derived variables