Testing R

How to make an R post with a graph

I am planning to post quite a few things on computation and R. This is a basic post that demonstrates the capability.

  1. the .Rmd file is created as usual. It should be in /blog/_R folder
  2. Run _knitposts.R from the main directory of the repository. The paths should be set accordingly so it knows where to take the .Rmd file from and where to put the resulting .md and picture files for rendering with Jekyll.
  3. It should be good to go now.
library(MASS)
# here a comment
set.seed(0)
x <- rnorm(10)
y <- rnorm(10)
plot(x, y)

figure

Here I am repeating code, but instead of liquid tag highlighting it with backticks.

library("MASS")
# here a comment
set.seed(0)
x <- rnorm(10)
y <- rnorm(10)
plot(x, y)