categ_mapping: Categorical mapping

View source: R/trans_categ_mapping.R

categ_mappingR Documentation

Categorical mapping

Description

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.

Usage

categ_mapping(attribute)

Arguments

attribute

attribute to be categorized.

Value

returns a data frame with binary attributes, one for each possible category.

Examples

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)

daltoolbox documentation built on April 12, 2025, 1:28 a.m.