From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Babel/R: trouble with :units header arg Date: Thu, 21 Apr 2011 21:38:55 +0200 Message-ID: <4DB087CF.5000502@christianmoe.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:52747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCzdX-000529-9k for emacs-orgmode@gnu.org; Thu, 21 Apr 2011 15:34:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCzdW-0005rj-Fr for emacs-orgmode@gnu.org; Thu, 21 Apr 2011 15:33:59 -0400 Received: from mars.hitrost.net ([91.185.211.18]:23603) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCzdW-0005WW-9h for emacs-orgmode@gnu.org; Thu, 21 Apr 2011 15:33:58 -0400 Received: from lk.92.63.17.213.dc.cable.static.lj-kabel.net ([92.63.17.213] helo=Celebrian-2.local) by mars.hitrost.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.73) (envelope-from ) id 1QCzcy-00073m-TZ for emacs-orgmode@gnu.org; Thu, 21 Apr 2011 21:33:24 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode 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: -> -> 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