makeDummies: Function to convert factor variables to binary indicators

Description Usage Arguments Value

View source: R/utilities-categorical.R

Description

Function to convert factor variables to binary indicators

Usage

1

Arguments

df

Data frame

Value

List with data frame with factor columns converted to dummy indicators and the names of the columns of the transformed data frame.

For each factor variable in the data frame, a binary indicator is generated for (k - 1) of its k levels. The first level is dropped. The original factor variable is dropped. The names of the binary indicators are the result of combining the name of the original factor variable and the level represented by the indicator.


IQSS/PSI-Library documentation built on Feb. 15, 2020, 9:03 p.m.