domain {mappings} | R Documentation |
Domain and codomain of a mapping.
Description
Domain and codomain of a mapping.
Usage
domain(x)
codomain(x)
Arguments
x |
A |
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)
[Package mappings version 0.1 Index]