Usage
categorize(variable, ..., sep = ";", ignore_case = TRUE)
Arguments
- variable
a character vector
- ...
dynamic dots, list of recoding
- sep
Separator between the results
- ignore_case
should match be case-sensitive or not.
Value
A named character vector
Examples
categorize(
c("banana apple", "apple orange pear", "apple", "cucumber"),
"yellow fruits" = c("banana", "pear"),
"bad fruits" = c("orange")
)
#> [1] "yellow fruits" "yellow fruits;bad fruits"
#> [3] "" ""