Compute "Child Nutrition Assessment [Parent]: Sum [Validation: No more than 0 missing or declined]"
Source:R/scores_ph.R
compute_ph_p_cna_nm.RdComputes the summary score ph_p_cna_sum
Child Nutrition Assessment [Parent]: Sum [Validation: No more than 0
missing or declined]
Summarized variables:
ph_p_cna_001ph_p_cna_002ph_p_cna_003ph_p_cna_004ph_p_cna_005ph_p_cna_006ph_p_cna_007ph_p_cna_008ph_p_cna_009ph_p_cna_010ph_p_cna_011ph_p_cna_012ph_p_cna_013ph_p_cna_014
Excluded values:
999
777
Usage
compute_ph_p_cna_nm(
data,
name = "ph_p_cna_nm",
exclude = c("777", "999"),
combine = TRUE
)Arguments
- data
tbl, Dataframe containing the columns to be summarized.
- name
character, Name of the new column to be created. Default is the name in description, but users can change it.
- exclude
character, Values to be excluded from the summary score.
- combine
logical, If
TRUE, the summary score will be appended to the input data frame. IfFALSE, the summary score will be returned as a separate data frame.
Examples
if (FALSE) { # \dontrun{
compute_ph_p_cna_nm(data) |>
select(
all_of(c("ph_p_cna_nm", vars_ph_p_cna))
)
} # }