Description Usage Arguments Note
This function creates k-1 binary variables, where k is the number of unique values of var
.
It prints to the console which value will be used as the reference, and therefore won't have a binary variable.
1 |
D |
A data.table or data.frame |
var |
A character string of the desired variable to dummy |
rm.var |
Logical, defaults to TRUE where the original variable will be removed |
In keeping with data.table's methodology this function does not need to be assigned to a new object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.