From mboxrd@z Thu Jan 1 00:00:00 1970 From: Riccardo Romoli Subject: Re: R export graphics Date: Mon, 13 Feb 2012 10:56:51 +0100 Message-ID: References: <82798AB2-5E94-4F7D-84CE-6EF27843FD5D@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=00235452ef5460c96f04b8d57f53 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:35951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwseY-00026m-CT for emacs-orgmode@gnu.org; Mon, 13 Feb 2012 04:56:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwseS-0003rZ-2k for emacs-orgmode@gnu.org; Mon, 13 Feb 2012 04:56:58 -0500 Received: from mail-qw0-f48.google.com ([209.85.216.48]:61846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwseR-0003rU-Sv for emacs-orgmode@gnu.org; Mon, 13 Feb 2012 04:56:52 -0500 Received: by qauh8 with SMTP id h8so3274735qau.0 for ; Mon, 13 Feb 2012 01:56:51 -0800 (PST) In-Reply-To: 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: emacs-orgmode@gnu.org --00235452ef5460c96f04b8d57f53 Content-Type: text/plain; charset=ISO-8859-1 Hi Thomas, thanks for your fast replay. I had thought of this solution too but, since I have many folders that I need to move between, I need to have a "pivot" to start with. Best Riccardo 2012/2/13 Thomas S. Dye > 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 > --00235452ef5460c96f04b8d57f53 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Thomas,
thanks for your fast replay.
I had thought of this solution too but, since I have many folders that I need to= move between, I need to hav= e a "pivot" to start with.

Best
Riccardo

2012/2= /13 Thomas S. Dye <ts= d@tsdye.com>
Riccardo Romoli <ric.romoli@gmail.com> 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:
> =A0Error in pdf(file =3D "~/Dropbox/PhD/myFigure.pdf") : can= not 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 betwee= n 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=

--00235452ef5460c96f04b8d57f53--