1

The org manual describes how to evaluate a src block and capture the results, using

:results <collection> <type> <format> <handling>

# i prefer to use this terminology for the four classes of option
:results <collection-method> <value-type> <result-type> <insertion-method>

The description of the difference between <result-type> link and <result-type> graphics isn't comprehensive. It seems to describe them together, as if they are effectively identical. However, running the following works correctly (saves plot to ./t.svg, and inserts link to ./t.svg)

#+begin_src R :results file graphics :file t.svg
x <- 1:10
y <- 2*x + rnorm(10)
plot(x, y)
#+end_src

But the following saves the plot as Rplots.pdf and inserts a link to ./t.svg.

#+begin_src R :results file link :file t.svg
x <- 1:10
y <- 2*x + rnorm(10)
plot(x, y)
#+end_src
  • Is there supposed to be any difference between the two?
  • Does the difference depend on the src language being used? (the documentation of R src blocks never mentions <result-type> link)
1
  • 1
    I don't think there is supposed to be any difference (but only because the documentation groups the two together) and the fact that they are treated differently by R src blocks feels like a bug to me, but I have not investigated in any detail. You might want to ask your question on the Org mode mailing list.
    – NickD
    Jan 20 at 16:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.