View source: R/act_svyciprop_tbl.R
act_svyciprop_tbl | R Documentation |
Similar to act_svyciprop, but able to spit out a dataframe containing estimates for multiple variables/responses. Variables and responses are input as vectors.
act_svyciprop_tbl(variable_vect_name, response, design_obj, ...)
variable_vect_name |
a vector of variables of interest (in quotes) |
response |
a vector of response of intersest for each entry in varibale_vect_name. Note that these are paired by order and that the number of entries in variable_vect_name and response must be equal |
... |
arguments passed to svyciprop |
design |
svydesign object containing the variables/values. Can only take one svydesign. To call multiple svydesigns in parallel, see purrr package or Rtesunate::act_svyciprop_list() |
A mutli-row dataframe providing the variable names, weighted mean proportions of observations taking value of interest, cluster-adjusted 95% CIs, and counts as n/N character variable (N is all non-NA values).
using api data from survey package
data(api)
design <- svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc)
variable_vect_name <- c("cname", "sch.wide", "awards")
response <- c("Los Angeles", "Yes", "Yes")
act_svyciprop_tbl(variable_vect_name, response, design)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.