generateStrata: Generate one strata variable from multiple factors

Description Usage Arguments Value Author(s) Examples

Description

For strata defined by multiple variables (e.g. sex,age,country) one combined variable is generated.

Usage

1
generateStrata(df, stratavars, name)

Arguments

df

a data.frame

stratavars

character vector with variable name

name

name of the newly generated variable

Value

The original data set with one new column.

Author(s)

Alexander Kowarik

Examples

1
2
3
x <- testdata
x <- generateStrata(x,c("sex","urbrur"),"strataIDvar")
head(x)


Search within the sdcMicro package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.