toBinary: toBinary

Description Usage Arguments Value Author(s)

Description

Transforms categorical data to binary rows, if the data type of a column is numerical the function will ignore this column and maintain it as numerical.

The function prepareData will use this function to transform the inputed survey data.

Usage

1
toBinary(X, reference_col = FALSE, use_base = TRUE, verbose = FALSE)

Arguments

X

data matrix containing categorical data

reference_col

(optional, default=FALSE) variable defining which columns to use as reference columns. If FALSE the algorithm will automatically select which categories to use as reference, if TRUE all categories will be maintain.

use_base

(optional, default=TRUE) use base R function

verbose

(optional, default=FALSE) be verbose

Value

X data matrix containing binary data

Author(s)

M. Esteban Munoz H.


emunozh/GREGWT documentation built on May 16, 2019, 5:11 a.m.