View source: R/reformat_nut_health_indicators.R
reformat_nut_health_indicators | R Documentation |
#' Function to reformat and standardize the values of columns for nutrition and health analysis. This function is intended to be a helper function and to be called from within the format_nut_health_indicators function after column names and preliminary checks have been made. This function will check the values for each relevant column and in some cases prompt the user for recoding inputs. This function covers anthropometric columns, Washington Group Short Set indicators, infant and young child feeding indicators, food security outcome indicators, and a few other MSNA relevant health indicators.
reformat_nut_health_indicators(
df,
health_barriers = NULL,
lcs_variables = NULL,
livelihood_variables = NULL,
value_map
)
df |
Inputs a data frame directly from the format_nut_health_indicators function. |
health_barriers |
Inputs a character vector of column names for self-reported health barriers. |
lcs_variables |
Inputs a character vector of column names for livelihood coping strategies. |
livelihood_variables |
Inputs a character vector of column names specifying all the livelihood activities for which income is received. These should be numerical columns with estimated income per livelihood activity. As per MSNA core indicator bank 2023. |
value_map |
Inputs a value map which is generated from other heatlhyr functions to facilitate recoding. |
Returns a dataframe with standardized values for specific columns, that can then be used to calculate composite or other indicators.
## Not run: reformat_nut_health_indicators(df = myhealthdata, health_barriers =
c("healthbarrier_colname_1", "healthbarrier_colname_2", ...), lcs_variables =
c("lcs_colname1", "lcs_colname2", ...))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.