R/generate_template.R

Defines functions generate.template

Documented in generate.template

#' @name generate.template
#' @title Generate Pipeline Template
#' @description Generate an R script template for running the Sharpton Lab dada2 pipeline
#' @param filename A string to name the resulting template. If the .R extension is not included in the filename, it will be appended. Default is "metaGTx_processing.R"
#' @export
#' @examples
#' generate.template()
#' file.show("metaGTx_processing.R")

generate.template <- function(filename = "metaGTx_processing.R") {
  if (!grepl("\\.R$", filename)) { filename <- paste0(filename, ".R") }
  data("template_code", package = "metaGTx.processing")
  writeLines(template.code, con = filename)
}
kstagaman/sharpton-lab-metaGTx.processing documentation built on Oct. 2, 2022, 4:39 p.m.