R/class_qs.R

Defines functions store_get_packages.tar_qs store_write_path.tar_qs store_read_path.tar_qs store_assert_format_setting.qs store_class_format.qs

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

#' @export
store_assert_format_setting.qs <- function(format) {
}

#' @export
store_read_path.tar_qs <- function(store, path) {
  qs::qread(file = path, use_alt_rep = TRUE)
}

#' @export
store_write_path.tar_qs <- function(store, object, path) {
  preset <- store$resources$qs$preset %|||%
    store$resources$preset %|||%
    "high"
  qs::qsave(x = object, file = path, preset = preset)
}

#' @export
store_get_packages.tar_qs <- function(store) {
  "qs"
}

Try the targets package in your browser

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

targets documentation built on Oct. 12, 2023, 5:07 p.m.