My first R Markdown Document. Here's how to make one:
n <- 50
a <- 2
b <- -3
sigSq <- 0.5
x <- runif(n)
y <- a + b * x + rnorm(n, sd = sqrt(sigSq))
(avgX <- mean(x))
## [1] 0.4864
kntr takes the code in the .Rmd document and makes a .md document and figures.
plot(x, y)
abline(a, b, col = "red")