R/tar_helper_raw.R

Defines functions tar_helper_raw

Documented in tar_helper_raw

#' @rdname tar_helper
#' @export
tar_helper_raw <- function(path = NULL, code = NULL) {
  tar_assert_chr(path)
  tar_assert_scalar(path)
  dir_create(dirname(path))
  writeLines(deparse_script_code(code), path)
  invisible()
}
ropensci/targets documentation built on June 13, 2025, 5:18 a.m.