dummy | R Documentation |
Create Dummy Variables
dummy( x, subset = rep(TRUE, length(x)), reference = sort(unique(x[!is.na(x)])), includeAll = FALSE )
x |
|
subset |
|
reference |
the reference value for the dummy variables to compare to. |
includeAll |
logical value indicating whether all of the dummy variables should be returned (including the reference). |
A matrix containing the dummy variables.
data(mri) # Create a dummy variable for chd dummy(mri$chd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.