flag_summary_table: Flag Summary Table

View source: R/flag_summary_table.R

flag_summary_tableR Documentation

Flag Summary Table

Description

This function identifies all columns with 'flag' included in the name, and will summarize these flagged variables by the grouping variable specified. This would commonly be used to assess data quality issues across data collection teams, administrative areas, or clusters. Flag columns must be coded as 1s and 0s, with one indicating a data quality issue for that record.

Usage

flag_summary_table(df, grouping = NULL)

Arguments

df

Inputs a dataframe that has been standardized with the format_nut_health_indicators function, and flagged 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

grouping

Inputs a character value identifying the column by which to summarize the number of flags reported. For example, it may specify a column for team id, administrative area, or cluster. Leaving this blank will assume no grouping and just summarize the results overall.

Value

Returns a dataframe, a summary table of the number of flags reported by grouping.

Examples

## Not run: flag_summary_table(df = mydata, grouping = "enumerator")

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