sdoh_child_ages_region <-
dplyr::select(sdoh, c(REGION, ACS_PCT_AGE_0_4, ACS_PCT_AGE_5_9,
ACS_PCT_AGE_10_14, ACS_PCT_AGE_15_17))
mean_group_tbl(data = sdoh_child_ages_region,
var_stem = "ACS_PCT_AGE",
group = "REGION",
group_name = "us_region",
na_removal = "pairwise",
var_labels = c(
ACS_PCT_AGE_0_4 = "% of population between ages 0-4",
ACS_PCT_AGE_5_9 = "% of population between ages 5-9",
ACS_PCT_AGE_10_14 = "% of population between ages 10-14",
ACS_PCT_AGE_15_17 = "% of population between ages 15-17"))
set.seed(0222)
grouped_data <-
data.frame(
symptoms.t1 = sample(c(0:10, -999), replace = TRUE, size = 50),
symptoms.t2 = sample(c(NA, 0:10, -999), replace = TRUE, size = 50)
)
mean_group_tbl(data = grouped_data,
var_stem = "symptoms",
group = ".t\\d",
group_type = "pattern",
na_removal = "listwise",
ignore = c(symptoms = -999))
Run the code above in your browser using DataLab