svy_group_means | R Documentation |
This function groups srvyr data by a grouping variable and then calculates and displays group means and counts with standard errors.
svy_group_means(df, gr, mean_vars, tbl_title, quietly = TRUE)
df |
A srvyr survey object |
gr |
Character. The name of the grouping variable in df. |
mean_vars |
Character vector. Names of one or more variables in df to calculate means for. |
tbl_title |
Character. Title for summary table to be printed. |
quietly |
Logical. Calculate means without displaying them. If they are to be displayed, the gt package needs to be installed. |
Dataframe with group counts and means
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.