From mboxrd@z Thu Jan 1 00:00:00 1970 From: Riccardo Romoli Subject: R export graphics Date: Sun, 12 Feb 2012 23:32:40 +0100 Message-ID: <82798AB2-5E94-4F7D-84CE-6EF27843FD5D@gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:54973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rwhu3-0004T8-8J for emacs-orgmode@gnu.org; Sun, 12 Feb 2012 17:28:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rwhu2-0001Ii-Aa for emacs-orgmode@gnu.org; Sun, 12 Feb 2012 17:28:15 -0500 Received: from mail-ee0-f41.google.com ([74.125.83.41]:65084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rwhu2-0001Ic-55 for emacs-orgmode@gnu.org; Sun, 12 Feb 2012 17:28:14 -0500 Received: by eekc13 with SMTP id c13so1746096eek.0 for ; Sun, 12 Feb 2012 14:28:13 -0800 (PST) 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 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