View source: R/replace_pattern_in.R
replace_pattern_in | R Documentation |
Replace string pattern in text file
replace_pattern_in(
file_contents,
replace,
basedir = ".",
dir_recursive = TRUE,
reader = readLines,
file_pattern = "\\.(R|r)(nw|md)?$",
file_contents_perl = TRUE,
file_contents_fixed = FALSE,
file_contents_ignore_case = FALSE,
writer = writeLines
)
file_contents |
Character string containing a regular expression to be matched in the
given character vector. Passed to |
replace |
The replacement, passed to |
basedir |
The root of the directory tree in which files will be searched recursively. |
dir_recursive |
(logical, default: |
reader |
A function, akin to |
file_pattern |
A regular expression passed to |
file_contents_perl |
(logical, default: |
file_contents_fixed |
(logical, default: |
file_contents_ignore_case |
(logical, default: |
writer |
A function that will rewrite the file from the character vector read in. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.