powered by
Create a cluster of nodes for parallel computation
makeCluster( numberOfThreads, singleThreadToMain = TRUE, setAndromedaTempFolder = TRUE )
An object representing the cluster.
Number of parallel threads.
If numberOfThreads is 1, should we fall back to running the process in the main thread?
numberOfThreads
When TRUE, the andromedaTempFolder option will be copied to each thread.
fun <- function(x) { return (x^2) } cluster <- makeCluster(numberOfThreads = 3) clusterApply(cluster, 1:10, fun) stopCluster(cluster)
Run the code above in your browser using DataLab