From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: R export graphics Date: Sun, 12 Feb 2012 13:04:45 -1000 Message-ID: References: <82798AB2-5E94-4F7D-84CE-6EF27843FD5D@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwiTW-00082o-SX for emacs-orgmode@gnu.org; Sun, 12 Feb 2012 18:04:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwiTV-0005ye-JF for emacs-orgmode@gnu.org; Sun, 12 Feb 2012 18:04:54 -0500 Received: from oproxy8-pub.bluehost.com ([69.89.22.20]:53566) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RwiTV-0005y6-Ab for emacs-orgmode@gnu.org; Sun, 12 Feb 2012 18:04:53 -0500 In-Reply-To: <82798AB2-5E94-4F7D-84CE-6EF27843FD5D@gmail.com> (Riccardo Romoli's message of "Sun, 12 Feb 2012 23:32:40 +0100") 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: Riccardo Romoli Cc: emacs-orgmode@gnu.org Riccardo Romoli writes: > Hi, I have some trouble exporting figures from an R-org-babel session. > > The code I use to generate the figure is: > > #+name: my figure > #+headers: :results graphics :file /Users/riccardoromoli/Documents/ > Dropbox/PhD/myFigure.pdf > #+begin_src R :session *R* :exports results > ... > #+end_src > > So, if I use : file /User/riccardoromoli/Documents/...., all works > right, but, if I use ~/Documents/..... the R console says: > Error in pdf(file = "~/Dropbox/PhD/myFigure.pdf") : cannot open file > ~/Dropbox/PhD/myFigure.pdf' > > I usually work in the DropBox folder because at work I have a linux > machine instead at my home I have an OsX machine, so if I could use > "~", I should not change the code every time I switch between the two > different computer. > > Best > Riccardo > Aloha Riccardo, If you work in your Dropbox/PhD folder (your .org files are there), then you should be able to do :file myFigure.pdf on both systems. hth, Tom -- Thomas S. Dye http://www.tsdye.com