Skip to contents

Begin

set_survey()
Specify the survey to analyze
var_list()
List variables in a survey.
set_opts() show_opts()
Set certain options

Counts, percentages, and means

tab()
Tabulate variables
total()
Total count
tab_cross() tab_subset()
Tabulate subsets or interactions

Rates

total_rate()
Overall rate
tab_rate()
Calculate rates
tab_subset_rate()
Calculate rates for subsets

Create or modify variables

var_case()
Convert factor to logical
var_collapse()
Collapse factor levels
var_cut()
Convert numeric to factor
var_any()
Is any variable true? (Logical OR)
var_all()
Are all the variables true? (Logical AND)
var_not()
Logical NOT
var_cross()
Cross or interact two variables
var_copy()
Copy a variable

Data for use in examples

namcs2019sv namcs2019sv_df
Selected variables from the National Ambulatory Medical Care Survey (NAMCS) 2019 Public Use File (PUF)
uspop2019
US Population in 2019
rccsu2018
National Study of Long-Term Care Providers (NSLTCP) Residential Care Community (RCC) Services User (SU) 2018 Public Use File (PUF)

Other

codebook()
Create a codebook for the survey
show_options()
Show package options
surveytable-options
Package options
survey_subset()
Subset a survey, while preserving variable labels
svyciprop_adjusted()
Confidence intervals for proportions, adjusted for degrees of freedom
print(<surveytable_table>) print(<surveytable_list>) as_object()
Print surveytable tables