0

I am new to knitr and would appreciate if someone could help me with a pointer on this.

Most examples I see using knitr/sweave create a data frame inside a chunk and then refers to that in the subsequent processing. However, what if I have massaged the raw into a data frame, and then want to use that. How do I do that?

I have tried saving the data frame as an R object, and then loading it inside a chunk, but I am not sure if this is the best way.

Thomas
  • 42,067
  • 12
  • 102
  • 136
user2758050
  • 47
  • 1
  • 6
  • Yes, I'd say that's the best way. Just make sure you use absolute paths in the `load` command in your knitr document. – Frank Sep 08 '13 at 08:22
  • Maybe [these](http://stackoverflow.com/questions/8434371/run-sweave-or-knitr-with-objects-from-existing-r-session/8437393#8437393) [links](http://stackoverflow.com/questions/15647282/can-knit2pdf-use-the-global-environment) are relevant? – Henrik Sep 08 '13 at 09:12
  • Thank you both for suggestions. – user2758050 Sep 09 '13 at 21:01

0 Answers0