HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Program Files/R/R-4.4.0/library/parallel/tests/snow2.RR
## reproducible examples.

library(parallel)

if(require(boot)) {
    run1 <- function(...) {
        library(boot)
        cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
        cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
        boot(cd4, corr, R = 500, sim = "parametric",
             ran.gen = cd4.rg, mle = cd4.mle)
    }
    cl <- makeCluster(mc <- 2)
    clusterSetRNGStream(cl, 123)
    cd4.boot <- do.call(c, parLapply(cl, seq_len(mc), run1))
    print(boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
                  conf = 0.9, h = atanh, hinv = tanh))
    stopCluster(cl)
}