title: Adding progress bar to replicate function in R
body: <p>I am using <code>replicate</code> to run my own <code>analyse</code> function multiple times (<code>analyse</code> returns a list):</p>
  
  <pre><code>results &lt;- replicate(reps, analyse())
  </code></pre>
  
  <p>Is there a way to add progress bar, showing the percentage of replications finished at the moment? I have tried with <code>txtProgressBar</code>, but don't know how to make it work without a for-loop.</p>
  
  <p>EDIT: reproducible example of <code>replicate:</code></p>
  
  <pre><code>analyse &lt;- function() {
    out &lt;- list('a' = vector('list', 5), 'b' = vector('list', 5))
  }
  results &lt;- replicate(3, analyse())
  </code></pre>
  
  <p>In my case, output of <code>analyse</code> is a deep list of lists with results. I would like the progress bar to update every time a new column of <code>results</code> is filled in, so after each replication.</p>