# NOT RUN {
cl <- default_cluster()
# Run code on each cluster and retrieve results
cluster_call(cl, Sys.getpid())
cluster_call(cl, runif(1))
# use ptype to simplify
cluster_call(cl, runif(1), ptype = double())
# use cluster_send() to ignore results
cluster_send(cl, x <- runif(1))
cluster_call(cl, x, ptype = double())
# }
Run the code above in your browser using DataLab