OneHot: 'OneHot'

View source: R/asnumeric.R

OneHotR Documentation

OneHot

Description

Produces a numeric matrix of binary predictor variables and a numeric vector of an outcome variable from an input data.frame. With the exception of outcome, all factor variables of data are converted to one binary column per factor level. Numeric variables are unchanged.

Usage

OneHot(data, outcome = NULL)

Arguments

data

A data.frame.

outcome

Optionally, the name of a variable in data to be converted to a numeric vector.


Displayr/flipTransformations documentation built on Feb. 26, 2024, 12:47 a.m.