R Markdown Using the knitr package
This is just a test for using knitr in Blogger. Part is just copy-pasted from the knitr package.
Let's try a histogram of u^2
hist(rnorm(100)^0.2)
A Minimal Example for Markdown
This is just copied from the knitr example. This is a minimal example of using knitr to produce an HTML page from Markdown.
R code chunks
# The sum of two uniform variables
S = runif(1000, 1, 2) + runif(1000, 0, 1)
hist(S, breaks = 25)
Math
Let's try some LaTeX math as usual: \( P(j|X) = \frac{e^{u_j}}{1+e^{u_j}} \).
Misc
You can indent code chunks so they can nest within other environments such as lists.
the area of a circle with radius x
pi * x^2
## Error: object 'x' not found
OK, that is great
Markdown is super easy to write. Go to knitr homepage for details.
No comments:
Post a Comment