onehotEncode: One-hot encode a factor

Description Usage Arguments Value Author(s) Examples

View source: R/onehotEncode.R

Description

One-hot encode a factor

Usage

1

Arguments

x

A factor

Value

A matrix of ones and zeros with length(x) rows and length(levels(x)) columns. If there is only one level returns a vector.

Author(s)

Edwin Graham <edwingraham1984@gmail.com>

Examples

1
normalise(0:100)

EdwinGraham/EdNet documentation built on May 6, 2019, 12:22 p.m.