title: Render Rmd in Loop But Name Files on Second Variable
body: <p>I am creating a series of reports by rendering HTML files with the following command:</p>
  <pre><code>for (workshopid in w){
       rmarkdown::render('C:/ReportSeries/Workshops_PresenterReport.Rmd',  
                  output_file =  paste(&quot;Workshop_&quot;,workshopid, '_', Sys.Date(), &quot;.html&quot;, sep=''), 
                  output_dir = 'C:/ReportSeries/temp')
  </code></pre>
  <p>}</p>
  <p>As you can see, I use <code>workshopid</code> to identify subsets that define each separate report.</p>
  <p>So far, all this works fine.</p>
  <p>What I would like is to use a second variable (a person's last name) to appear in the <code>output_file</code>, since the files are easier to identify this way.   I'm surprised replacing <code>paste(&quot;Workshop_&quot;,workshopid, '_', </code> with <code>paste(&quot;Workshop_&quot;,lastname, '_', </code> does not work, since the <strong>output_file</strong> argument only writes a file name.</p>
  <p>I have a list of <code>lastname</code> values that correspond with <code>workshopid</code> values.</p>
  <p>How to proceed?</p>