fact2mat: Turn factor into multiple column

Description Usage Arguments Value Examples

View source: R/fact2mat.R

Description

Turns a factor with several levels into a matrix with several columns composed of zeros and ones.

Usage

1

Arguments

x

a vector.

Value

Columns with zeros and ones.

Examples

1
2
x = sample(1:3,100,replace = TRUE)
fact2mat(x)

ZIprop documentation built on June 9, 2021, 5:09 p.m.