Markdown documents are fully reproducible and work with several programming languages (e.g. Python, SQL), for more details see [@RStudio:2016;@GitHub:2014].
Use the latex commands:
Code can be inserted in the text using grave accent ( $\grave{}$ ), e.g. x=1
, or in markdown blocks, such that
x <- seq(1, 10, length.out = 100) round(x,2)
The chunk can also include plot commands, which crete and insert the figures in the the text, such as Figure \ref{fig:simple-r-plot} produced by the following chunk
r plot example. For \\code{LaTex} code in the caption use double backslash \\textbackslash\\textbackslash.', fig.pos="ht"}
y <- cos(x)
plot(x, y, type = "l", col = "red")
lines(x, -y, col = "blue")
For more details see the package vignette and the following web tutorials http://rmarkdown.rstudio.com/index.html and https://guides.github.com/features/mastering-markdown/.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.