View source: R/trans_categ_mapping.R
categ_mapping | R Documentation |
Categorical mapping provides a way to map the levels of a categorical variable to new values. Each possible value is converted to a binary attribute.
categ_mapping(attribute)
attribute |
attribute to be categorized. |
returns a data frame with binary attributes, one for each possible category.
cm <- categ_mapping("Species")
iris_cm <- transform(cm, iris)
# can be made in a single column
species <- iris[,"Species", drop=FALSE]
iris_cm <- transform(cm, species)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.