# convert strings to sentence case stringr::str_to_sentence(c("aaa", "BBB")) # -> "Aaa", "Bbb" # rename multiple values patterns <- list( "old1" = "new1", "old2" = "new2" ) stringi::stri_replace_all_regex( c("old1 value", "old2 value"), pattern = names(patterns), replacement = unlist(patterns), vectorize_all = FALSE ) # -> "new1 value" "new2 value"