Dynamic documents!

For our meeting today, I’ll be sharing tales of my adventures in creating dynamic documents  — building R code right into my papers and presentations, so all of the figures, tables, statistics, etc. are generated automatically by the code — and tips and tricks for folks interested in trying this out.

I’ve tried two different methods for weaving my code in with my text: r-markdown, and sweave (r-latex). Both involve writing the document in plain text (with either markdown or latex formatting), with chunks of code throughout. The main difference is that markdown is MUCH easier to learn, and latex is MUCH more powerful. I’ll focus on latex during my r-club presentation since you all can probably figure out r-markdown pretty well on your own and don’t need me talking at you about it.

To whet your appetite, here are some latex resources:
http://www.tug.org/pracjourn/2008-1/zahn/zahn.pdf
http://mirror.jmu.edu/pub/CTAN/macros/latex/contrib/apa6/apa6.pdf
http://merkel.zoneo.net/Latex/natbib.php
http://yihui.name/knitr/demo/sweave/
https://support.rstudio.com/hc/en-us/articles/200552056-Using-Sweave-and-knitr

Here are my latest dynamic documents:

https://github.com/rosemm/context_word_seg

https://www.dropbox.com/s/5jm99cy17xfuetx/workshop1_slides.Rnw?dl=1

2 comments

  1. rose

    Hey did you know RStudio has spell check? So handy.
    Edit>Check Spelling… (for F7 for keyboard shortcut)