subset.sqlsurvey: Subsets of large survey designs

Description Usage Arguments Value Examples

Description

Takes a subset of a large survey design. This involves creating a new table containing just the information about which variables are in the subset. The new table will be garbage-collected when the R object is no longer in use.

Usage

1
2
3
4
## S3 method for class 'sqlsurvey'
subset(x, subset, ...)
## S3 method for class 'sqlrepsurvey'
subset(x, subset, ...)

Arguments

x

Object of class sqlsurvey or sqlrepsurvey. This will not be modified in any way

subset

R logical expression specifying the subset to keep. The syntax is slightly restricted as the expression must be translatable into SQL: log,exp, arithmetic,logical, and trigonometric functions, %in%, but not user-defined functions.

...

for methods

Value

object of the same class as x, specifying the subset.

Examples

1
2
3
4
5
6
## Not run: 
alabama <- subset(acs, ST==1)

hasbp <- subset(nhanes, !is.na(bpxsar) & !is.na(bpxdar))

## End(Not run)

sqlsurvey documentation built on May 2, 2019, 4:53 p.m.