# NOT RUN {
library(survey)
data(api)
dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc)
ggbarcrosstabs3d_svy(dstrat, stype, yr.rnd, awards)
ggbarcrosstabs3d_svy(dstrat, stype, yr.rnd, awards, fill = TRUE)
data(nhanes)
design <- svydesign(id=~SDMVPSU, strata=~SDMVSTRA, weights=~WTMEC2YR, nest=TRUE,data=nhanes)
ggbarcrosstabs3d_svy(design, race, agecat, RIAGENDR)
# }
Run the code above in your browser using DataLab