factorsToDummyVariables.numdfr: Quickly create design matrix for simple cases

Description Usage Arguments Value Note Author(s) See Also Examples

Description

numdfr specific version of this function from addendum.

Usage

1
2
## S3 method for class 'numdfr'
factorsToDummyVariables(dfr, betweenColAndLevel = "", dfrConvData, verbosity=0, ...)

Arguments

dfr

numdfr object for which the design matrix must be made

betweenColAndLevel

If factors are present, what character should be between the original name and the value name?

dfrConvData

Prepared conversion info (return value of dfrConversionProbs). Can be used (and is preferred) to avoid repeating calculations.

verbosity

The higher this value, the more levels of progress and debug information is displayed (note: in R for Windows, turn off buffered output)

...

Ignored in standard implementations

Value

Matrix with a row for every observation and a column for every numerical variable/ level of factor.

Note

Typical use is for glmnet

Author(s)

Nick Sabbe

See Also

NumDfr, addendum, factorsToDummyVariables

Examples

1
2
iris.nd<-numdfr(iris)
factorsToDummyVariables(iris.nd)

NumDfr documentation built on May 2, 2019, 5:50 p.m.