knitr

Yihui Xie

Department of Statistics, Iowa State University

ENAR 2013 @ Orlando

Disclaimer

Pictures in the slides are for fun only. Please do not take them too seriously. I apologize in advance if they seem offensive.

Changing just a tiny little bit in my LaTeX tabular


via

Sweave

Sweave is an extremely important contribution to reproducible research

Sweave ≈ LaTeX + R

the idea is fantastic, but when a student sees LaTeX

One Ring to Rule 'em All?

Change


same model, different appearance

Same idea, more choices

  • Authoring languages
    • LaTeX
    • HTML
    • Markdown
    • reStructuredText
    • ...
  • Computing languages
    • R
    • Python
    • shell scripts
    • C++ (Rcpp)
    • ...

The key idea

Report = Narrative + Code

Demo

  • local demos: R + Markdown, R + LaTeX, R + HTML
    • numeric output, graphics, syntax highlighting, code formatting, cache, language engines, ...
  • web demos

Applications

Learn knitr?

  • install.packages('knitr')
  • https://yihui.org/knitr
  • watch the video to get started

Acknowledgement

Questions?

image via