R/tar_resources_clustermq.R

Defines functions tar_resources_clustermq

Documented in tar_resources_clustermq

#' @title Target resources: `clustermq` high-performance computing
#' @export
#' @family resources
#' @description Create the `clustermq` argument of `tar_resources()`
#'   to specify optional high-performance computing settings
#'   for `tar_make_clustermq()`.
#'   For details, see the documentation of the `clustermq` R package
#'   and the corresponding argument names in this help file.
#' @inheritSection tar_resources Resources
#' @return Object of class `"tar_resources_clustermq"`, to be supplied
#'   to the `clustermq` argument of `tar_resources()`.
#' @param template Named list, `template` argument to
#'   `clustermq::workers()`.
#' @examples
#' # Somewhere in you target script file (usually _targets.R):
#' tar_target(
#'   name,
#'   command(),
#'   resources = tar_resources(
#'     clustermq = tar_resources_clustermq(template = list(n_cores = 2))
#'   )
#' )
tar_resources_clustermq <- function(
  template = list()
) {
  out <- resources_clustermq_init(
    template = template
  )
  resources_validate(out)
  out
}

Try the targets package in your browser

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

targets documentation built on Sept. 21, 2021, 5:09 p.m.