View source: R/cleaning_log_helper.R
cleaning_log_helper | R Documentation |
Function to facilitate creation of cleaning log segments for single types of flags.
cleaning_log_helper(df, uuid, flag, cols, description = NULL)
df |
Inputs a dataframe with flags, and selection of columns with values to clean if record is flagged |
uuid |
Inputs a character value of the uuid column name. |
flag |
Inputs a character value of the column specifying flagged records for a single type of issue. Flag columns must be coded as a 1 for flagged, or 0 if no flag or issue. |
cols |
Inputs a character vector of column names that should be included in the exported cleaning log. |
description |
Inputs a character, or brief custom description of the type of flag. To be included in the cleaning log. |
Returns a REACH style cleaning log listing all flags of the specified type, and variables/values to be checked or cleaned because of that flag for all flagged records.
## Not run: cl <- cleaning_log_helper(df = df, uuid = "uuid_col", flag = "flag_wgss_age",
cols = c("age_years", wgss_vars), description = "Washington Group Short Set values
are present for a person under-5 years of age. This indicator set is not applicable for
this age group.")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.