Description Usage Arguments Author(s) See Also Examples
Gathers all information that are needed to compute survey statistics into a design.
1 | svydbdesign(st = NULL, id = NULL, wt = NULL, data)
|
st |
Column name specifying the strata column. |
id |
Column name specifying the cluster column. |
wt |
Column name specifying the sampling weights column. |
data |
A data frame or sql table of the survey data set.. |
Charco Hui
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(nhane)
nh.dbsurv = svydbdesign(st = SDMVSTRA, wt = WTMEC2YR, id = SDMVPSU, data = nhane)
nh.dbsurv$subset(Race3 == 3)
nh.dbsurv$getmh()
nh.dbsurv$getwt()
nh.dbsurv$clone()
# OR with a database connection
# library(MonetDBLite)
# library(DBI)
# library(dbplyr)
# con = dbConnect(MonetDBLite())
# dbWriteTable(con, "nhane", nhane)
# nhane.db = tbl(con, "nhane")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.