Learn R Programming

simFrame (version 0.5.4)

stratify: Stratify data

Description

Generic function for stratifying data.

Usage

stratify(x, design)

Arguments

x

the data.frame to be stratified.

design

a character, logical or numeric vector specifying the variables (columns) to be used for stratification.

Value

An object of class "Strata".

Methods

x = "data.frame", design = "BasicVector"

stratify data according to the variables (columns) given by design.

See Also

"'>Strata"

Examples

Run this code
# NOT RUN {
data(eusilcP)
strata <- stratify(eusilcP, c("region", "gender"))
summary(strata)
# }

Run the code above in your browser using DataLab