tests/testthat/test_par_pblapply.R

test_that("par_pblapply performs lapply", {
  X <- list(rnorm(7), 1:5, c(rep(0, 3), rep(1, 9)))
  FUN <- function(x) 2 * x + x^2 - 12
  expect_identical(lapply(X, FUN), par_pblapply(X, FUN, n_cores = 1))
  expect_identical(lapply(X, FUN), par_pblapply(X, FUN, n_cores = 2))
})

Try the RGCCA package in your browser

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

RGCCA documentation built on May 29, 2024, 9:59 a.m.