Learn R Programming

StratifiedSampling (version 0.4.1)

disj: Disjunctive

Description

This function transforms a categorical vector into a matrix of indicators.

Usage

disj(strata)

Value

A matrix of indicators.

Arguments

strata

A vector of integers that represents the categories.

Author

Raphaël Jauslin raphael.jauslin@unine.ch

Examples

Run this code
strata <- rep(c(1,2,3),each = 4)
disj(strata)

Run the code above in your browser using DataLab