Description Usage Arguments Value Examples
View source: R/data_manipulation.R
Make indicator variables for each levels in a categorical variable.
1 | makeIndicator(x, levels)
|
x |
a character vector of a categorical variable. |
levels |
a character vector of unique levels in |
a data frame of indicator variables of each level in the categorical variable x.
1 2 3 | data(Queensland)
makeIndicator(Queensland[,polActivitiesRaw], c("boycot","union","demonstration","internet","paper","volunteer"))
makeIndicator(Queensland[,"previousVoteRaw"], c("Liberal","Greens","Katter","Labor"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.