From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [PATCH] Re: [BUG] [babel] R graphics header arg :units Date: Tue, 19 Jun 2012 07:26:37 -0600 Message-ID: <878vfjbfft.fsf@gmx.com> 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]:33674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgySS-0005eJ-9N for emacs-orgmode@gnu.org; Tue, 19 Jun 2012 09:27:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgySO-0006ii-HU for emacs-orgmode@gnu.org; Tue, 19 Jun 2012 09:26:59 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:52497) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SgySO-0006iH-AI for emacs-orgmode@gnu.org; Tue, 19 Jun 2012 09:26:56 -0400 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: "Thomas S. Dye" Cc: Andreas Leha , 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 Applied, Thanks Tom -- Eric Schulte http://cs.unm.edu/~eschulte