From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: [PATCH] Re: [BUG] [babel] R graphics header arg :units Date: Tue, 19 Jun 2012 09:05:55 +0200 Message-ID: <87395rbx2k.fsf@med.uni-goettingen.de> References: <871uldd738.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:32800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgsWt-0003Zd-Ro for emacs-orgmode@gnu.org; Tue, 19 Jun 2012 03:07:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgsWr-0003bO-Nt for emacs-orgmode@gnu.org; Tue, 19 Jun 2012 03:07:11 -0400 Received: from plane.gmane.org ([80.91.229.3]:46630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgsWr-0003bA-Gm for emacs-orgmode@gnu.org; Tue, 19 Jun 2012 03:07:09 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SgsWp-0005xv-4p for emacs-orgmode@gnu.org; Tue, 19 Jun 2012 09:07:07 +0200 Received: from genepi110.genepi.med.uni-goettingen.de ([134.76.140.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Jun 2012 09:07:07 +0200 Received: from andreas.leha by genepi110.genepi.med.uni-goettingen.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Jun 2012 09:07:07 +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: emacs-orgmode@gnu.org tsd@tsdye.com (Thomas S. Dye) writes: > Andreas Leha writes: > >> Hi all, >> >> I am having troubles in using the header argument :units which is >> implemented for R source blocks. Example: >> >> #+begin_src R :results graphics :file wideplot.png :width 14 :height 7 :units "cm" >> plot(1:10, 1:10) >> #+end_src >> >> >> This expands to >> >> : png(filename="wideplot.png",height=7,units=cm,width=14) >> : plot(1:10, 1:10) >> : dev.off() >> >> and leads -- when evaluated -- to the error >> >> : Fehler in match.arg(units, c("in", "px", "cm", "mm")) : >> : 'arg' must be NULL or a character vector >> >> I guess this is a bug, correct? Otherwise, how do I correctly use >> this header argument? >> >> Regards, >> Andreas >> >> >> > > Aloha all, > > The attached patch handles quoted string values for R device header > arguments. With the patch the following works as expected: > > #+header: :width 100 :height 100 :units "mm" :res 120 > #+BEGIN_SRC R :results graphics :file "test.png" > x <- c(1,2,3,4,5) > y <- x > plot(x,y) > #+END_SRC > > All the best, > Tom Hi Tom, very nice. With your patch I can confirm the :units argument accepts quoted strings! Thanks a lot, Andreas