showMethods("bpmapply")
fun <- function(greet, who) {
paste(Sys.getpid(), greet, who)
}
greet <- c("morning", "night")
who <- c("sun", "moon")
param <- bpparam()
bpworkers(param) <- 2
## Not run:
# result <- bpmapply(fun, greet, who, BPPARAM = param)
# cat(paste(result, collapse="\n"), "\n")
# ## End(Not run)
Run the code above in your browser using DataCamp Workspace