set_survey {surveytable}R Documentation

Specify the survey to analyze

Description

You need to specify a survey before the other functions, such as tab(), will work.

Usage

set_survey(design, opts = "NCHS", csv = getOption("surveytable.csv"))

Arguments

design

either a survey object (survey.design or svyrep.design) or a data.frame for an unweighted survey.

opts

set certain options. See below.

csv

name of a CSV file

Details

opts:

Optionally, the survey can have an attribute called label, which is the long name of the survey.

Optionally, each variable in the survey can have an attribute called label, which is the variable's long name.

Value

Info about the survey.

See Also

Other options: set_count_1k(), set_output(), show_options(), surveytable-options

Examples

set_survey(namcs2019sv)

[Package surveytable version 0.9.4 Index]