test_BatchJobsParam <- 
    param <- BatchJobsParam(2, progressbar=FALSE, cleanup=TRUE)
    checkEquals(as.list(sqrt(1:3)), bplapply(1:3, sqrt, BPPARAM=param))

    X <- list(1, "2", 3)
    param <- BatchJobsParam(2, progressbar=FALSE, stop.on.error=FALSE)
    res <- tryCatch({
        bplapply(X, sqrt, BPPARAM=param)
    }, error=identity)
    checkTrue(is(res, "bplist_error"))
    checkTrue(is(attr(res, "result")[[2]], "remote_error"))

Try the BiocParallel package in your browser

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

BiocParallel documentation built on Nov. 8, 2020, 5:46 p.m.