[R] SWEAVE - a gentle introduction

Duncan Murdoch murdoch.duncan at gmail.com
Tue Nov 17 20:09:34 CET 2015


On 17/11/2015 10:42 AM, Marc Schwartz wrote:
>
>> On Nov 17, 2015, at 9:21 AM, John Sorkin <jsorkin at grecc.umaryland.edu> wrote:
>>
>> I am looking for a gentle introduction to SWEAVE, and would appreciate recommendations.
>> I have an R program that I want to run and have the output and plots in one document. I believe this can be accomplished with SWEAVE. Unfortunately I don't know HTML, but am willing to learn. . . as I said I need a gentle introduction to SWEAVE.
>> Thank you,
>> John
>>
>
>
> John,
>
> A couple of initial comments.
>
> First, you will likely get some recommendations to also consider using Knitr:
>
>    http://yihui.name/knitr/
>
> which I do not use myself (I use Sweave), but to be fair, is worth considering as an alternative.

He did, and I'd agree with them.  I've switched to knitr for all new 
projects and some old ones.  knitr should be thought of as Sweave 
version 2.

Duncan Murdoch

>
> Second, to create stand alone documents, as opposed to web based content, you will likely want the output to be in TeX/LaTeX via Sweave, which can then become PDF based documents via the post processing of the TeX/LaTeX source. That is what I do for all of my analytic deliverables. You can also use LaTeX classes like 'Beamer' to create Powerpoint-like slides for presentation.
>
> Fritz' web site for Sweave is here:
>
>    http://www.statistik.lmu.de/~leisch/Sweave/
>
> and there are some links to supporting materials there with very basic examples.
>
> Another resource is:
>
>    https://beckmw.files.wordpress.com/2014/02/sweave_intro1.pdf
>
> and if you Google for Sweave Introductions and Tutorials, there are a myriad of others.
>
> In conjunction with Sweave itself, there are a variety of supporting packages on CRAN that have related functionality (e.g. formatted LaTeX output) that are worth knowing about and are included in the Reproducible Research task view:
>
>    https://cran.r-project.org/web/views/ReproducibleResearch.html
>
> Regards,
>
> Marc Schwartz
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list