Factor2Binary: Converts a Factor into its indicator matrix

Description Usage Arguments Value Author(s) Examples

View source: R/Factor2Binary.R

Description

Converts a factor into a binary matrix with as many columns as categories of the factor

Usage

1
Factor2Binary(y, Name = NULL)

Arguments

y

A factor

Name

Name to use in the final matrix

Value

An indicator binary matrix

Author(s)

Jose Luis Vicente Villardon

Examples

1
2
y=factor(c(1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1))
Factor2Binary(y)

MultBiplotR documentation built on April 6, 2021, 9:08 a.m.