Before running this script, n
should be defined,
for instance, from the terminal,
Rscript -e 'n=rpois(1,1000); templater::render_template("example_cor.Rmd",output=sprintf("example_cor_%d.html",n))'
A correlation with r n
points:
x <- rnorm(n) y <- x/2+rnorm(n) plot( x, y ) abline(coef(lm(y~x)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.