R/class_null.R

Defines functions store_reformat_null store_write_path.tar_null store_read_path.tar_null store_assert_format_setting.null store_class_format.null

#' @export
store_class_format.null <- function(format) {
  c("tar_null", "tar_store")
}

#' @export
store_assert_format_setting.null <- function(format) {
  tar_throw_validate("Users should not set format = \"null\".")
}

#' @export
store_read_path.tar_null <- function(store, path) {
  NULL
}

#' @export
store_write_path.tar_null <- function(store, object, path) {
}

store_reformat_null <- function(target) {
  outcome <- metrics_outcome(target$metrics)
  error <- target$settings$error
  if (identical(outcome, "error") && identical(error, "null")) {
    target_reformat(target, "null")
  }
}

Try the targets package in your browser

Any scripts or data that you put into this service are public.

targets documentation built on Oct. 3, 2024, 1:11 a.m.