Learn R Programming

MultBiplotR (version 23.11.0)

Integer2Binary: Transforms an Integer Variable into a Binary Variable

Description

Transforms an Integer Variable into a Binary Variable

Usage

Integer2Binary(y, name = "My_Factor")

Value

A Binary Data Matrix

Arguments

y

Vector with the factor

name

name of the factor

Author

Jose Luis Vicente-Villardon

Details

Transforms an Integer vector into a Binary Indicator Matrix

Examples

Run this code
dat=c(1, 2, 2, 4, 1, 1, 4, 2, 4)
Integer2Binary(dat,"Myfactor")

Run the code above in your browser using DataLab