R/replace_word.R

Defines functions replace_word

Documented in replace_word

#' Starting a new IUform Shiny aplication
#'
#' @param file this is the file
#' @param pattern gives pattern
#' @param replace gives replacement
#'
replace_word <- function(file, pattern, replace) {
  suppressWarnings(tx <- readLines(file))
  tx2 <- gsub(pattern = pattern, replacement = replace, x = tx)
  writeLines(tx2, con = file)
}
urodoct/iuform documentation built on Dec. 1, 2020, 2:21 a.m.