powered by
Domain and codomain of a mapping.
domain(x)codomain(x)
codomain(x)
x A vector of the same type as we supplied when the mapping was created.
mapping
A mapping.
sex.mapping <- mapping(c("Female", "F", "Male", "M"), c(0, 0, 1, 1)) domain(sex.mapping) codomain(sex.mapping)
Run the code above in your browser using DataLab