title: output of doParallel workers
body: <p>Suppose I have a code that does various calculations in a <em>foreach</em> loop, for simplicity let it be this:</p>
  
  <pre><code>foreach( idx = 1:10 ) %dopar% {
     set.seed(idx)
     smp &lt;- rnorm(10)
     print( sprintf('Index: %d', idx) )
     print( cat(sprintf('Value: %f \n', smp[1:10])) )
  }
  </code></pre>
  
  <p>The main idea of the code is that its output is written in such way, that the index is presented once, after which follows various results of the main code. It is then easy to read a log file and debug with such structure when using <code>%do%</code>, however with <code>%dopar%</code> the log file gets cluttered. </p>
  
  <p>Question: <em>Without changing the code</em>, is there a way for each worker to create its own output file? I'm new in working with <code>doParallel</code>, so the only way of parallel output I've found so far is using the following:</p>
  
  <pre><code>library(doParallel)
  cl &lt;- makeCluster(4, outfile = 'log.txt')
  registerDoParallel(cl)
  </code></pre>
  
  <p>However, <code>outfile</code> takes only a string as an argument, haven't found a way of passing a vector of names to it. So, maybe there is a way to specify an output file for each worker?</p>
  
  <p><em>NB: Working on Windows 7.</em></p>