find_replace | R Documentation |
Find and replace single or multiple values in a vector. Usage is similar to gsub except that this function will not replace parts of character strings
find_replace(pattern, replacement, x)
pattern |
vector of values to find |
replacement |
vector of values to replace |
x |
a character vector where matches are sought |
Nikolai Klibansky
## Not run:
# Find and replace names of multiple parameters
rdat <- rdat_BlackSeaBass
parms <- rdat$parms
parms_names <- names(parms)
parms_key <- c("R0"="BH.R0", "M.msst"="M.constant", "M.MSST"="M.constant")
find_replace(names(parms_key),parms_key,parms_names)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.