R/cluster_get_comparators.R

Defines functions get_comparators.cluster_pairs

#' @importFrom parallel clusterCall
get_comparators.cluster_pairs <- function(pairs) {
  comparators <- clusterCall(pairs$cluster, function(name) {
    if (!require("reclin2"))
      stop("reclin2 needs to be installed on cluster nodes.")
    env <- reclin_env[[name]]
    get_comparators(env$pairs)
  }, name = pairs$name)
  # we now have a set of comparators for each cluster node; they 
  # should all be the same: returns the first one
  comparators[[1]]
}

Try the reclin2 package in your browser

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

reclin2 documentation built on May 29, 2024, 4:21 a.m.