R/taf_roxy.R

Defines functions taf_roxy

Documented in taf_roxy

#' create a blank data set file
#'
#' description
#'
#' @param dataset the name of the dataset that will be created
#' @return OUTPUT_DESCRIPTION
#' @details DETAILS
#' @examples
#' \dontrun{
#' if (interactive()) {
#'   # EXAMPLE1
#' }
#' }
#' @rdname taf_roxy
#'
#' @importFrom TAF taf.boot.path
#'
#' @export

taf_roxy <- function(dataset) {
  txt <-
    c(
      "#' title",
      "#'",
      "#' description",
      "#'",
      paste0("#' @name ", dataset),
      "#' @format csv file",
      "#' @tafOriginator ICES",
      "#' @tafYear 2020",
      "#' @tafAccess Public",
      "#' @tafSource script",
      "",
      "library(icesTAF)",
      ""
    )

  cat(txt, sep = "\n", file = taf.boot.path(paste0(dataset, ".R")))
}
colinpmillar/cpmtools documentation built on June 28, 2022, 10:35 p.m.