Guest User

Untitled

a guest
Sep 24th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. ## Libraries to load
  2. library("foreach")
  3. library("doParallel")
  4.  
  5.  
  6. no_cores <- detectCores() - 1
  7. cl <- makeCluster(no_cores, type="FORK")
  8. registerDoParallel(cl)
  9. result <- foreach(i=10:10000) %dopar% sqrt(i)
  10. stopCluster(cl)
Add Comment
Please, Sign In to add comment