Add custom text in string based on values specified in text vector in R Let’s say I have a vector of string values that looks something like: