create_cleaning_log_flags: Create Cleaning Log from Data Quality Flags

View source: R/create_cleaning_log_flags.R

create_cleaning_log_flagsR Documentation

Create Cleaning Log from Data Quality Flags

Description

This function aggregates all flags for nutrition and health indicators analysed in this package and generates a REACH style cleaning log. An analyst must still review the log to make final decisions on what should or should not be changed.

Usage

create_cleaning_log_flags(df, uuid_col, file_path = NULL)

Arguments

df

Inputs a dataframe which has been standardized with the format_nut_health_indicators function and flagged with the flag_nut_health_issues function. It will also recognize flags from the flag_anthro_issues, flag_mortality_issues, and flag_iycf_issues functions

uuid_col

Inputs a character value to identify the uuid column in the dataset. This will be included in the returned dataframe to facilitate cleaning.

file_path

Inputs a character file_path. Use this argument if you want to save a xlsx file of the cleaning log as a part of running this function.

Value

Returns a dataframe object, styled as a REACH cleaning log.

Examples

## Not run: create_cleaning_log_flags(df = mydata, uuid_col = "X_uuid",
file_path = "mycleaninglogs/health_cleaning_log.xlsx")
## End(Not run)

SaeedR1987/healthyr documentation built on July 4, 2023, 11:17 p.m.