There's literally nothing on the internet showing how these work in conjunction with one another. I would really appreciate even the simplest example of a Rnw document that you would run with Sweave() in R.
If you could provide a title, a simple plot, centered on the page, and a page number. Please, lets see how you would do it.
TIA.
Best Answer
Here is an example where I shamelessly copied some R code from Cross-Validated. It can be compiled in many ways, but personally I used
where
1.Rnw
actually reads:With Beamer, you just have to replace the first line with
or add whatever customizations you want, replace
\maketitle
with something like\frame{\titlepage}
, and then enclose every code chunks with a\begin{frame}[fragile] ... \end{frame}
statement. Compilation goes the same way as aforementioned.Code chunks can be customized using, e.g.
It requires
fancyvrb
and needs to be somewhere after the\begin{document}
. Personally, I hold in an external configuration file, among other stuff,Here is a snapshot: