R knitr
knitr
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
Further reading and resources