Append Suffix to (Selected) Character Values
Arguments
- values
vector of character values to which suffix is to be appended
- suffix
(character) suffix to be pasted to values that are not in valuesToOmit
- valuesToOmit
vector of values in values to which no suffix is to be appended
Examples
values <- c("a", "b", "c")
# Append ".1" to all values
appendSuffix(values, ".1")
#> [1] "a.1" "b.1" "c.1"
# Append ".1" to all values but "c"
appendSuffix(values, ".1", valuesToOmit = "c")
#> [1] "a.1" "b.1" "c"