Learn R Programming

surveytable (version 0.9.7)

survey_subset: Subset a survey, while preserving variable labels

Description

Subset a survey, while preserving variable labels

Usage

survey_subset(design, subset, label)

Value

a new survey object

Arguments

design

a survey object

subset

an expression specifying the sub-population

label

survey label of the newly created survey object

Examples

Run this code
children = survey_subset(namcs2019sv, AGE < 18, "Children < 18")
set_survey(children)
tab("AGER")

Run the code above in your browser using DataLab