#Here's the basics to do parallel computing in R library(doSNOW) cl = makeCluster(2, type = "SOCK") #cl = makeCluster(c(rep("cypress",6),rep("baker",6),rep("seymour",6),rep("grouse",6)), type = "SOCK") registerDoSNOW(cl) # Sequential foreach(i = 1:10)%do%{ expensiveFunction() } # Parallel foreach(i = 1:10)%dopar%{ expensiveFunction() } stopCluster(cl)