prop | R Documentation |
Calculates proportions and its variance of a variable or condition from ELSOC, considering complex survey design
prop(.data, x, by, vartype, na.rm = FALSE, name.format = 1, ...)
.data |
Data frame or tbl_svy survey object object |
x |
Variable, variable name or logical vector to calculate proportions |
by |
Vector of variables to group estimates |
vartype |
Report variability as one or more of: standard error ('se', default), confidence interval ('ci'), variance ('var') or coefficient of variation ('cv'). vartype = NULL for no variability |
na.rm |
A logical value to indicate whether missing values of x should be dropped |
name.format |
Controls the output's name format (1 or 2). Useful for prop_list function |
elsoc_example %>% prop(m0_sexo, by = ola) elsoc_example %>% prop(c01 %in% c(4,5), by = c(ola, m0_sexo))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.