inst/testme/test-makeClusterFuture-quote-args.R

if (getRversion() >= "4.4.0") {
  library(future)
  library(parallel)

  plan(sequential)
  
  if (getRversion() >= "4.5.0") {
    cl <- makeCluster(1L, type = future::FUTURE)
  } else {
    cl <- makeClusterFuture(1L)
  }

  message("clusterCall(cl, identity, quote(y)) ...")
  arg <- quote(y)
  res <- clusterCall(cl, identity, arg)
  str(res)
  stopifnot(identical(res[[1]], arg))

  stopCluster(cl)
  plan(sequential)
}

Try the future package in your browser

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

future documentation built on Nov. 2, 2026, 5:08 p.m.