From: Christian Moe <mail@christianmoe.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: Babel/R: trouble with :units header arg
Date: Thu, 21 Apr 2011 21:38:55 +0200 [thread overview]
Message-ID: <4DB087CF.5000502@christianmoe.com> (raw)
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
reply other threads:[~2011-04-21 19:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DB087CF.5000502@christianmoe.com \
--to=mail@christianmoe.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).