[R] Reproducible research

Rainer M Krug r.m.krug at gmail.com
Thu Sep 9 10:12:05 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/09/10 07:47, David Scott wrote:
>  I am investigating some approaches to reproducible research. I need in
> the end to produce .html or .doc or .docx. I have used hwriter in the
> past but have had some problems with verbatim output from  R. Tables are
> also not particularly convenient.
> 
> I am interested in R2HTML and R2wd in particular, and possibly odfWeave.
> 
> Does anyone have sample documents using any of these approaches which
> they could let me have?

Hi David

I am using emacs + org-mode (http://orgmode.org/) for exactly this (see
http://orgmode.org/worg/org-contrib/babel/intro.php#reproducable-research for
an example for Reproducible research
andhttp://orgmode.org/worg/org-contrib/babel/languages/org-babel-doc-R.php
about R in emacs + org-mode + ESS.

It is literate programming at its best.

Concerning reproducible research and report generating, org-babel has
one HUGE advantage: you an combine different programming languages
easily in the report - so e.g. you can do your analysis in R, do some
data preparation in python, and some final file manipulations in bash -
and everything is in one file and reproducible (see
http://orgmode.org/worg/org-contrib/babel/intro.php#meta-programming-language
and
http://orgmode.org/worg/org-contrib/babel/examples/data-collection-analysis.php).

I think that would be the best tool for the job (see
http://orgmode.org/worg/org-contrib/babel/uses.php for examples for what
it can be used - some will be relevant for your intended application).

Although emacs has a steep learning curve, it is definitely worth it
(and it works on Linux, Windows and Mac) - and the mailing list is also
really good.

Cheers,

Rainer



> 
> David Scott
> 
> _________________________________________________________________
> 
> David Scott    Department of Statistics
>         The University of Auckland, PB 92019
>         Auckland 1142,    NEW ZEALAND
> Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055
> Email:    d.scott at auckland.ac.nz,  Fax: +64 9 373 7018
> 
> Director of Consulting, Department of Statistics
> 
> ______________________________________________
> R-help at r-project.org mailing list
> 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.


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:        +33 - (0)9 53 10 27 44
Cell:       +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:      Rainer at krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyIltUACgkQoYgNqgF2egpb/QCfW0zgFrNqC6/58sounMDwmsNm
VgIAn3ZaDhcKGmo+Fwv+yz0UxXqiDaBC
=vZV+
-----END PGP SIGNATURE-----



More information about the R-help mailing list