````r options(width = 75) options(useFancyQuotes=FALSE)
# A minimal R Markdown example A quote: > Markdown is not LaTeX. To compile me, run this in R: library(knitr) knit('001-minimal.Rmd') cat('foo') cat("foo") See [output here](https://github.com/yihui/knitr-examples/blob/master/001-minimal.md). ## code chunks A _paragraph_ here. A code chunk below (remember the three backticks): ```r 1+1 .4-.7+.3 # what? it is not zero!
It is easy. I did not really show the plot here; if you want it, remove the option eval=FALSE
from the chunk header below.
plot(1:10) hist(rnorm(1000))
Yes I know the value of pi is r pi
, and 2 times pi is r 2*pi
.
Sigh. You cannot live without math equations. OK, here we go: $\alpha+\beta=\gamma$. Note this is not supported by native markdown. You probably want to try RStudio, or at least the R package markdown, or the function knitr::knit2html()
.
You can write code within other elements, e.g. a list
r
strsplit('hello indented world', ' ')[[1]]
Nothing fancy. You are ready to go. When you become picky, go to the knitr website.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.