title: Is there a way to knitr markdown straight out of your workspace using RStudio?
body: <p>I wonder whether I can use <code>knitr</code> markdown to just create a report on the fly with objects stemming from my current workspace. Reproducibility is not the issue here. I also read this very fine <a href="https://stackoverflow.com/questions/8434371/run-sweave-or-knitr-with-objects-from-existing-r-session">thread here</a>. </p>
  
  <p>But still I get an error message complaining that the particular object could not be found. </p>
  
  <p>1) Suppose I open a fresh markdown document and save it. </p>
  
  <p>2) write a chunk that refers to some <code>lm</code> object in my workspace. call <code>summary(mylmobject)</code></p>
  
  <p>3) knitr it.</p>
  
  <p>Unfortunately the report is generated but the regression output cannot be shown because the object could not be found. Note, it works in general if i just save the object to .Rdata and then load it directly from the markdown file. </p>
  
  <p>Is there a way to use objects in R markdown that are in the current workspace?
  This would be really nice to show non R people some output while still working.</p>