listBatchReplace {wrMisc} | R Documentation |
Replacements in list
Description
listBatchReplace
replaces in list lst
all entries with value searchValue
by replaceBy
Usage
listBatchReplace(
lst,
searchValue,
replaceBy,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
Arguments
lst |
input-list to be used for replacing |
searchValue |
(character, length=1) |
replaceBy |
(character, length=1) |
silent |
(logical) suppress messages |
debug |
(logical) additional messages for debugging |
callFrom |
(character) allow easier tracking of messages produced |
Value
This function returns a corrected list
See Also
basic replacement sub
in grep
Examples
lst1 <- list(aa=1:4, bb=c("abc","efg","abhh","effge"), cc=c("abdc","efg"))
listBatchReplace(lst1, search="efg", repl="EFG", sil=FALSE)
[Package wrMisc version 1.15.1 Index]