knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
batchgsub
provides a function, Shiny app and RStudio addin for batch replacement of text content in files.
install.packages("batchgsub")
To install the developmental version from GitHub
# install.packages("remotes") remotes::install_github("poissonconsulting/batchgsub")
library(batchgsub) path <- tempdir() file <- file.path(path, "file1.txt") writeLines("The quick brown fox jumps over the lazy dog", con = file) readLines(file) batch_gsub("o", "ooo", path = path, regexp = "[.]txt$", ask = FALSE) readLines(file)
batchgsub::run_app()
The RStudio addin opens the Shiny app from the Addins menu.
The RStudio addin allows the user to set a keyboard shortcut to run the Shiny app.
Please report any issues.
Pull requests are always welcome.
Please note that the batchgsub project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.