title: Run Sweave or knitr with objects from existing R session
body: <p>Suppose I have an object <code>x</code> in my current session:</p>
  
  <pre><code>x &lt;- 1
  </code></pre>
  
  <p>How can I use this object in an Sweave or knitr document, without having to assign it explicitly:</p>
  
  <pre><code>\documentclass{article}
  \begin{document}
  &lt;&lt;&gt;&gt;=
    print(x)
  @
  \end{document}
  </code></pre>
  
  <p>Reason I am asking is because I want to write an R script that imports data and then produces a report for each subject using an Sweave template.</p>