View source: R/fix_functions.R
f_replace | R Documentation |
Searches a data.frame for a specific character string and replaces it with another one
f_replace(
x,
string,
replacement,
complete = TRUE,
select = 1:ncol(x),
track = TRUE
)
x |
A data.frame |
string |
A character string to search in the data.frame |
replacement |
A character string to replace the old string (can be NA) |
complete |
If TRUE, search for complete strings only. If FALSE, search also for partial strings. |
select |
Numeric vector with the positions (all by default) to be affected by the function |
track |
Track changes? |
iris2 <- f_replace(iris, "setosa", "ensata")
track_changes(iris2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.