Replace values in atomic vectors
Arguments
- x
[
atomic]
Atomic vector. Ifxis a factor, all replacements work on the levels.- from
[
atomic]
Atomic vector with values to replace, same length asto.- to
[
atomic]
Atomic vector with replacements, same length asfrom.- regex
[
logical]
Use regular expression matching? Default isFALSE.- ignore.case
[
logical]
Argument passed togsub.- perl
[
logical]
Argument passed togsub.- fixed
[
logical]
Argument passed togsub.
Details
Replaces values specified in from with values in to.
Regular expression matching can be enabled which calls gsub iteratively
on x to replace all patterns in from with replacements in to.