R/tabulate_survey.R
tabulate_survey.Rd
This function has been superseeded by tab_survey()
please use that function
instead.
tabulate_survey(
x,
var,
strata = NULL,
pretty = TRUE,
wide = TRUE,
digits = 1,
method = "logit",
na.rm = FALSE,
deff = FALSE,
proptotal = FALSE,
rowtotals = FALSE,
coltotals = FALSE
)
a survey design object
the bare name of a categorical variable
a variable to stratify the results by
if TRUE
, default, the proportion and CI are merged
if TRUE
(default) and strata is defined, then the results are
presented in a wide table with each stratification counts and estimates in
separate columns. If FALSE
, then the data will be presented in a long
format where the counts and estimates are presented in single columns. This
has no effect if strata is not defined.
if pretty = FALSE
, this indicates the number of digits used
for proportion and CI
a method from survey::svyciprop()
to calculate the confidence
interval. Defaults to "logit"
When TRUE
, missing (NA) values present in var
will be removed
from the data set with a warning, causing a change in denominator for the
tabulations. The default is set to FALSE
, which creates an explicit
missing value called "(Missing)".
a logical indicating if the design effect should be reported. Defaults to "TRUE"
if TRUE
and strata
is not NULL
, then the totals of the
rows will be reported as proportions of the total data set, otherwise, they
will be proportions within the stratum (default).
if TRUE
and strata
is defined, then an extra "Total"
column will be added tabulating all of the rows across strata.
if TRUE
a new row with totals for each "n" column is
created.
a long or wide tibble with tabulations n, ci, and deff