test-for-how-to-use-Org-Babel-for-R.org 682 B

Example of Org-Babel for R Literate Programming

R text output

A simple summary.

x <- rnorm(10) summary(x)

R graphics output

Note we use the object x generated in previous code block, thanks to the header option :session *R*. The output graphics file is =a.png=.

y <- rnorm(10) plot(x, y)

Same plot with larger dimension:

plot(x, y)