Description Usage Arguments Value Examples
This function takes away the need to rely on ifelse() to create dummy variables.
1 |
x |
A vector of factor data to convert to a dummy. |
... |
Terms to recode as 1. |
factor |
Convert the dummy to a factor variable? Defaults to FALSE. |
labels |
If factor = T, a character vector to specify the names of the resulting levels (e.g. c("Tails", "Heads")). Defaults to c("Off", "On"). |
A vector of dummy data.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.