get_factor_recode: get_factor_recode

View source: R/generic_standardise.R

get_factor_recodeR Documentation

get_factor_recode

Description

get_factor_recode

Usage

get_factor_recode(config_path)

Arguments

config_path

path to the directory containing the config files for this dataset

Value

a named vector of expressions. There is one element (expression) per factor specified in the config files. The expressions are calls to readr::fct_recode corresponding to the level recode mapping for specified in the config files. Their names are the standard column names of the factor. Thus when unquote-spliced into mutate, the returned vector generates a valid set of named arguments for a mutate call that will recode the factor variables in the way specified.


HorridTom/hospitalflow documentation built on June 14, 2022, noon