title: Output of parallel computing in R on Windows
body: <p>I would like to do some parallel computing in R on Windows. </p>
  
  <pre><code>library(doSNOW)
  library(foreach)
  cl&lt;-makeCluster(4)
  registerDoSNOW(cl)
  
  nn = seq(2,20, by=2)
  nn2 = rep(-1,10)
  vector.accessed.within.iteration = rep(0, 10)
  
  y = foreach(i=1:10) %dopar% {
  
     print(paste0('i = ', i))
     nn2[i] = (nn[i])^2
     vector.accessed.within.iteration[i] = nn[i] + nn2[i]
     nn2[i]
  } 
  
  stopCluster(cl)
  </code></pre>
  
  <p>When running the code, <code>y</code> is returned as the list of squares from 2 to 20, as intended. However, neither vector <code>nn2</code> nor <code>vector.accessed.within.iteration</code> are modified within <code>foreach</code> loop. Furthermore, the printing <code>print(paste0('i = ', i))</code> does not occur. </p>
  
  <p>Is it possible to run iterations of a loop in parallel on windows while also displaying messages and modifying variables from global environment? </p>