Wednesday, April 25, 2018

R Analysis Report with Emacs Org Mode

Write a test.org file as follows:



* Test
You can write inline expressions like \pi = src_R{pi}.

Here is a code chunk.
#+NAME:foo
#+begin_src R :file plot.png :exports both :results output graphics
  x <- rnorm(100)
  summary(x)
  plot(x)
#+end_src

Export to HTML file (1st image) with C-c C-e h o
Export to PDF file (2nd image) with C-c C-e l o




No comments:

Post a Comment