appendSuffix: Append Suffix to (Selected) Character Values

View source: R/string.R

appendSuffixR Documentation

Append Suffix to (Selected) Character Values

Description

Append Suffix to (Selected) Character Values

Usage

appendSuffix(values, suffix, valuesToOmit = NULL)

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

Value

values with suffix appended to those values that are not in valuesToOmit

Examples

values <- c("a", "b", "c")
  
# Append ".1" to all values
appendSuffix(values, ".1")
  
# Append ".1" to all values but "c"
appendSuffix(values, ".1", valuesToOmit = "c")
  

KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.