Description Usage Arguments Details Value Author(s) Examples
View source: R/text_manipulation_in_scripts.r
Opens all files with a .r or .R extension in the directory and runs a gsub.
1 2 3 4 5 6 7 8 9 |
fullPath |
A character vector with the path to the folder containing the scripts to modify. |
pattern |
passed to |
replacement |
passed to |
recursive |
logical. Passed to |
newPath |
description |
userCheck |
Logical, default = TRUE. Matches are shown to check the pattern 'accuracy' before replacement. |
ignore.case |
logical. FALSE for case-sensitive matches. Default is TRUE. |
If not working inside an R project, path has to be complete from root.
A data.frame with the number of matches in each file.
Alban Sagouis
1 2 | ## Not run: gsubInOneFolder('./R', pattern = 'sum', replacement = 'sumNA')
## Not run: gsubInOneFolder('.', pattern = 'read.csv', replacement = 'data.table::fread')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.