text2mapping {mappings} | R Documentation |
Convenient shorthand for specifying mappings with text strings
Description
Convenient shorthand for specifying mappings with text strings
Usage
text2mapping(
text,
file = NULL,
sep = "|",
flip = FALSE,
convert.na = TRUE,
numericWherePossible = TRUE,
...
)
Arguments
text |
A multi-line string specifying a mapping with 2 columns (see examples). |
file |
If |
sep |
Character used as column separator. |
flip |
If |
convert.na |
If |
numericWherePossible |
If |
... |
Further arguments passed to |
Value
A mapping
.
Examples
f <- text2mapping("
L | Low
M | Medium
H | High
")
f(warpbreaks$tension)
[Package mappings version 0.1 Index]