Learn R Programming

rbmi (version 1.4.1)

as_strata: Create vector of Stratas

Description

Collapse multiple categorical variables into distinct unique categories. e.g.

as_strata(c(1,1,2,2,2,1), c(5,6,5,5,6,5))

would return

c(1,2,3,3,4,1)

Usage

as_strata(...)

Arguments

...

numeric/character/factor vectors of the same length

Examples

Run this code
if (FALSE) {
as_strata(c(1,1,2,2,2,1), c(5,6,5,5,6,5))
}

Run the code above in your browser using DataLab