powered by
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 )
A data.frame
A character string to search in the data.frame
A character string to replace the old string (can be NA)
If TRUE, search for complete strings only. If FALSE, search also for partial strings.
Numeric vector with the positions (all by default) to be affected by the function
Track changes?
iris2 <- f_replace(iris, "setosa", "ensata") track_changes(iris2)
Run the code above in your browser using DataLab