powered by
Restore sustom capitalisation in a string
restore_capitals(x, items_to_capitalise)
A string with restored capitals
A string in which capitalisation needs to be restored
Whole words or acronyms in which capitalisation must be retained; special characters can be included (e.g. "R2-D2")
x <- "Should i tell c-3po the french call him z-6po?" restore_capitals(x, c("I", "C-3PO", "French", "Z-6PO"))
Run the code above in your browser using DataLab