R knitr

From "A B C"
Revision as of 17:13, 17 January 2015 by Boris (talk | contribs) (→‎RMarkdown)
Jump to navigation Jump to search

knitr


This page is a placeholder, or under current development; it is here principally to establish the logical framework of the site. The material on this page is correct, but incomplete.


This page contains examples for the use of knitr to create documents from RMarkdown or LaTex sources.



knitr is an R package for literate programming. It is integrated with R Studio and the exercises on this page assume you have R Studio installed.


RMarkdown

Markdown is an extremely simple and informal way of structuring documents that is useful if for some reason you feel html is too complicated. That's really all it does: format documents in a simple way so they can be displayed as Web pages. For Markdown documentation, see here.. The concept is quite similar to Wiki markup syntax, the syntax is (regrettably) different, and for a number of features there there are (regrettably) several different ways to achieve the same results.

RMarkdown is an R package that is integrated with R Studio and allows integrating R code with Markdown documents. knitr can work with Markdown files, and this gives additional output options, such as PDF and MSWord documents.


Let's give it a try: we'll develop an R function that will give us a random phobia to ponder on.

Task:
{{{1}}}



 

Contents

 

Notes

  1. For a complete list of chunk options, see the documentation by knitr's author, Xie Yihui.


 

Notes, Further Reading, and Resources


http://yihui.name/knitr/options/ A list of chunk options by the author of knitr. Required reading.
http://yihui.name/knitr/demos/ Demo files for many different aspects of knitr use. Learn by example.