R/tmp-parallelSetSeed.R

Defines functions parallelSetSeed

Documented in parallelSetSeed

#' Set seeds for reproducible parallel computing with 'parallelMap' package
#'
#' A wrapper for \pkg{parallel}::\code{\link[parallel]{clusterSetRNGStream}}.
#'
#' @param ... Arguments to be passed to \code{set.seed()}.
#' @param cl A cluster from either \pkg{parallel}  or package \pkg{snow},
#'           or (if \code{NULL}) the registered cluster.
#' @inheritParams set.seed
#' @inheritParams parallel::clusterSetRNGStream
#' @export
parallelSetSeed <- function(iseed = NULL, seed = iseed, cl = NULL, ...) {
    set.seed(seed = seed, ...)
    parallel::clusterSetRNGStream(iseed = iseed, cl = cl)
}
GegznaV/multiROC documentation built on Sept. 24, 2018, 8:17 p.m.