Clean and format the output table returned from the MUAC plausibility check for improved clarity and readability.
Source:R/plausibility_check_muac.R
mw_neat_output_muac.Rd
Clean and format the output table returned from the plausibility check of raw MUAC data for improved clarity and readability. It converts scientific notations to standard notations, round values and rename columns to meaningful names.
Value
A data.frame
object of the same length and width as df
, with column names and
values formatted for clarity and readability.
Examples
## First wranlge MUAC data ----
df_muac <- mw_wrangle_muac(
df = anthro.01,
sex = sex,
muac = muac,
age = NULL,
.recode_sex = TRUE,
.recode_muac = FALSE,
.to = "none"
)
## Then run the plausibility check ----
pl_muac <- mw_plausibility_check_muac(
df = df_muac,
flags = flag_muac,
sex = sex,
muac = muac
)
## Neat the output table ----
mw_neat_output_muac(df = pl_muac)
#> # A tibble: 1 × 9
#> `Total children` `Flagged data (%)` `Class. of flagged data` `Sex ratio (p)`
#> <int> <chr> <fct> <chr>
#> 1 1191 0.3% Excellent 0.297
#> # ℹ 5 more variables: `Class. of sex ratio` <chr>, `DPS(#)` <dbl>,
#> # `Class. of DPS` <chr>, `Standard Dev* (#)` <dbl>,
#> # `Class. of standard dev` <fct>