Hi,
Some Babel/R plots that worked a couple of months ago gave an error
message on the :units header arg when I tried to run them again now.
There could be many reasons (including a computer upgrade in the
meantime), but in case it's an Org thing, a minimal example follows
below (parabola plot for 8x8cm paper output). I'd appreciate any tips.
#+begin_src R :results graphics :file test.png :width 8 :height 8
:res 200 :units "cm"
x <- -10:10
y <- x^2
plot(x, y, type="l", col="red", lty=1)
#+end_src
Documentation indicates this should work, but I get:
Error in match.arg(units, c("in", "px", "cm", "mm")) :
'arg' must be NULL or a character vector
Calls: <Anonymous> -> <Anonymous> -> png -> match.arg
Execution halted
Same if I use single quotes or no quotes around "cm".
Replacing ~:units "cm"~ with ~:R-dev-args units="cm"~ works:
#+begin_src R :results graphics :file test.png :width 8 :height 8
:res 200 :R-dev-args units="cm"
x <- -10:10
y <- x^2
plot(x, y, type="l", col="red", lty=1)
#+end_src
#+results:
[[file:test.png]]
Yours,
Christian