Append Suffix to (Selected) Character Values
appendSuffix(values, suffix, valuesToOmit = NULL)
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 |
values with suffix appended to those values that are not in valuesToOmit
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"