title: Set Global Environment variable in parLapply
body: <p>I want to set the value of a .GlobalEnv variable from within a parLapply call to view the progress of the task. For example:</p>
  
  <pre><code>library(parallel)
  
  cl &lt;- makeCluster(1)
  
  progress &lt;- 0
  voos &lt;- parLapply(cl, c(1,2,3),
                function(x) {
                  ... some code ...
                  progress &lt;- progress + 1
                  return(...)
                })
  
  stopCluster(cl)
  </code></pre>
  
  <p>I tried using <code>assign('progress', get('progress', envir=.GlobalEnv) + 1, envir=.GlobalEnv)</code> but it doens't work.</p>
  
  <p>Is there a way to do this? Is there a better option?</p>