lsub {tidySEM} | R Documentation |
Apply pattern replacement over a vector
Description
lsub
returns a list of the same length as
replacement
, each element of which is the result of applying
gsub
to x
using lapply
.
Usage
lsub(x, replacement = NULL, pattern = "{C}", fixed = TRUE, ...)
Arguments
x |
A character vector where matches are sought. |
replacement |
a character vector of length 1 or more. Each element is
applied to |
pattern |
A character string containing a regular expression (or
character string when |
fixed |
logical. If TRUE, pattern is a string to be matched as is. Default: TRUE |
... |
Parameters passed on to |
Value
A list of results returned by gsub
.
Examples
lsub("a{C}", 1:3)
[Package tidySEM version 0.2.7 Index]