Replace matched pattern in a string

Share:

Description

Helper Function for xpssCompute. R Implementation of the SPSS REPLACE Function.

Usage

1
computeReplace (x,pattern=NULL,match=NULL, count = NULL)

Arguments

x

input vector

pattern

pattern to look for

match

string tp replace with

count

number of occurencees of pattern to replace

Value

String. Returns a character vector

Author(s)

Bastian Wiessner

See Also

str_replace str_replace_all str_sub<-

Examples

1
xpssCompute(x="Makfts sftnsft", fun="computeReplace",pattern="ft",match="e")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.