Integer2Binary function

Transforms an Integer Variable into a Binary Variable

Transforms an Integer Variable into a Binary Variable

Integer2Binary(y, name = "My_Factor")

Arguments

  • y: Vector with the factor
  • name: name of the factor

Details

Transforms an Integer vector into a Binary Indicator Matrix

Returns

A Binary Data Matrix

Author(s)

Jose Luis Vicente-Villardon

Examples

dat=c(1, 2, 2, 4, 1, 1, 4, 2, 4) Integer2Binary(dat,"Myfactor")
  • Maintainer: Jose Luis Vicente Villardon
  • License: GPL (>= 2)
  • Last published: 2023-11-21

Useful links