emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* R export graphics
@ 2012-02-12 22:32 Riccardo Romoli
  2012-02-12 23:04 ` Thomas S. Dye
  0 siblings, 1 reply; 3+ messages in thread
From: Riccardo Romoli @ 2012-02-12 22:32 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: R export graphics
  2012-02-12 22:32 R export graphics Riccardo Romoli
@ 2012-02-12 23:04 ` Thomas S. Dye
  2012-02-13  9:56   ` Riccardo Romoli
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas S. Dye @ 2012-02-12 23:04 UTC (permalink / raw)
  To: Riccardo Romoli; +Cc: emacs-orgmode

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:
>  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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: R export graphics
  2012-02-12 23:04 ` Thomas S. Dye
@ 2012-02-13  9:56   ` Riccardo Romoli
  0 siblings, 0 replies; 3+ messages in thread
From: Riccardo Romoli @ 2012-02-13  9:56 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]

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 <tsd@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:
> >  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
>

[-- Attachment #2: Type: text/html, Size: 2288 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-13  9:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-12 22:32 R export graphics Riccardo Romoli
2012-02-12 23:04 ` Thomas S. Dye
2012-02-13  9:56   ` Riccardo Romoli

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).