knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

batchgsub

Lifecycle: deprecated License: MIT

batchgsub provides a function, Shiny app and RStudio addin for batch replacement of text content in files.

Installation

install.packages("batchgsub")

To install the developmental version from GitHub

# install.packages("remotes")
remotes::install_github("poissonconsulting/batchgsub")

Demonstration

Function

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)

Shiny App

batchgsub::run_app()

Shiny app

RStudio addin

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.

RStudio addin

Contribution

Please report any issues.

Pull requests are always welcome.

Code of Conduct

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.



poissonconsulting/batchgsub documentation built on Feb. 13, 2021, 6:20 p.m.