lgsub: Pattern replacement in a list of character vectors

lgsubR Documentation

Pattern replacement in a list of character vectors

Description

Pattern replacement in a list of character vectors

Usage

lgsub(
  pattern,
  replacement,
  x,
  ignore.case = FALSE,
  perl = FALSE,
  fixed = FALSE,
  useBytes = FALSE,
  ...
)

Arguments

pattern, replacement, ignore.case, perl, fixed, useBytes

all arguments are passed to base::gsub() after x is converted to a character vector.

x

list object that contains character vectors.

...

additional arguments are ignored.

Details

This function is a simple wrapper around base::gsub() except it operates on a list.

Note that this function assumes the input data contains vectors and not embedded list objects.

Examples


x <- list(a=c("A", "B"), b=c("C,D"));
lgsub(",", "!:!", x)


jmw86069/genejam documentation built on Sept. 19, 2022, 1:53 p.m.