act_xtab | R Documentation |
Creates crosstabs showing weighted proportion and CIs for two categorical variables of interest
act_xtab(x, y, design, hundo = "row", print = FALSE, ...)
x |
variable of interest in svydesign object |
y |
variable of interest in svydesign object |
design |
svydesign object |
hundo |
string variable indicating how estimates add to 100%. Current options are "diagonal" or "row" (the default) |
print |
Boolean variable; determines if output is tidy/friendly for additional manipulation or in 2x2 format for print/human reading. Defaults to FALSE |
Crosstab of weighted proportions/CIs for two categorical variables
library(survey)
data(api)
dclus1 <- svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)
act_xtab("sch.wide", "comp.imp", dclus1, print = TRUE, method = "li")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.