replaceAll {maDB}R Documentation

Replace all occurences of a specified character in a string by a new character

Description

replaceAll This function helps to replace characters in a string or vector of strings.

Usage

replaceAll(x,old,new)

Arguments

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.

Details

This function replaces single characters with others.

Author(s)

Johannes Rainer

See Also

replaces

Examples

test <- c("zes","i have","an american","kezboard lazout")
replaceAll(test,old="z","y")
replaceAll(test,old=c("z","h"),new=c("y","d"))

[Package maDB version 1.14.1 Index]