replaceAll {maDB} | R Documentation |
replaceAll
This function helps to replace characters in a string or vector of strings.
replaceAll(x,old,new)
x |
The string or vector of strings where the replacements should occurr. |
old |
The character or vector of characters that should be replaced. |
new |
The character or vector of characters with whom the old characters should be replaced. |
This function replaces single characters with others.
Johannes Rainer
test <- c("zes","i have","an american","kezboard lazout") replaceAll(test,old="z","y") replaceAll(test,old=c("z","h"),new=c("y","d"))