# NOT RUN {
# }
# NOT RUN {
if (requireNamespace("future.apply", quietly = TRUE)) {
# Useless function, but requiring some argument beyond the first
foo <- function(y, somearg, ...) {
if ( is.null(somearg) || TRUE ) length(y)
}
# Whether FORK can be used depends on OS and whether Rstudio is used:
dofuture(matrix(1,ncol=4,nrow=3), foo, fit_env=list(), somearg=NULL,
nb_cores=2, cluster_args=list(type="FORK"))
}
# }
Run the code above in your browser using DataLab