title: R, passing variables to a system command
body: <p>Using R, I am looking to create a QR code and embed it into an Excel spreadsheet (hundreds of codes and spreadsheets). The obvious way seems to be to create a QR code using the command line, and use the "system" command in R. Does anyone know how to pass R variables through the "system" command? Google is not too helpful as "system" is a bit generic, ?system does not contain any examples of this.</p>
  
  <p>Note - I am actually using data matrices rather than QR codes, but using the term "data matrix" in an R question will lead to havoc, so let's talk QR codes instead. :-)</p>
  
  <pre><code>system("dmtxwrite my_r_variable -o image.png")
  </code></pre>
  
  <p>fails, as do the variants I have tried with "paste". Any suggestions gratefully received.</p>