domain: Domain and codomain of a mapping.

View source: R/mapping.R

domainR Documentation

Domain and codomain of a mapping.

Description

Domain and codomain of a mapping.

Usage

domain(x)

codomain(x)

Arguments

x

A mapping.

Value

x A vector of the same type as we supplied when the mapping was created.

Note

These aren't the true domain and codomain in the mathematical sense; both can contain duplicates.

Examples

sex.mapping <- mapping(c("Female", "F", "Male", "M"), c(0, 0, 1, 1))
domain(sex.mapping)
codomain(sex.mapping)

benjaminrich/mappings documentation built on June 23, 2024, 1:23 a.m.