Learn R Programming

mappings (version 0.1)

inverse: Inverse of a mapping

Description

Given a mapping x, return the inverse mapping.

Usage

inverse(x)

Arguments

Value

The inverse mapping.

Examples

Run this code
# NOT RUN {
sex.mapping <- mapping(c("Female", "F", "Male", "M"), c(0, 0, 1, 1))
sex.inverse.mapping <- inverse(sex.mapping)
sex.inverse.mapping(c(0, 0, 1, 0))
# }

Run the code above in your browser using DataLab