[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] ob-R, problem with try/catch
From: |
Thomas S. Dye |
Subject: |
Re: [O] ob-R, problem with try/catch |
Date: |
Thu, 23 Apr 2015 13:36:41 -1000 |
Hi Aaron,
Aaron Ecay <address@hidden> writes:
> Hi Tom,
>
> 2015ko apirilak 23an, "Thomas S. Dye"-ek idatzi zuen:
>>
>> IIRC :results output graphics is needed for the ggplot package.
>
> Hmm. This is the case if the code is *not* evaluated in a session. In
> a session, either value or output result types work. (All this has been
> tested with a recent master version.)
Yes, indeed. I'd forgotten this distinction, which Erik Iverson spelled
out clearly several years ago:
http://article.gmane.org/gmane.emacs.orgmode/26082
Unless Erik minds, I'll work his post into ob-doc-R when I find some
time. IMO, it would be nice to have this kind of systematic description
in the first place one goes for help.
> An unfortunate situation – IMO
> the value type ought to work outside of a session, provided that the
> value of the last expression in the block is a ggplot object.
>
> Here’s a code block that can be adapted to test various combinations:
>
> #+begin_src R :results output graphics :file foo.png :session *foo*
> library(ggplot2)
> ggplot(data.frame(x = rnorm(10), y = rnorm(10)),
> aes(x = x, y = y)) +
> geom_point()
> #+end_src
Thanks, this code will be useful as I pick up this project, which was
the first time I tried to do something substantial with Org mode. I'm
going to find a ton of cruft ...
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
- [O] ob-R, problem with try/catch, Thomas S. Dye, 2015/04/22
- Re: [O] ob-R, problem with try/catch, Charles C. Berry, 2015/04/22
- Re: [O] ob-R, problem with try/catch, Charles C. Berry, 2015/04/23
- Re: [O] ob-R, problem with try/catch, Rainer M Krug, 2015/04/23
- Re: [O] ob-R, problem with try/catch, Thomas S. Dye, 2015/04/23
- Re: [O] ob-R, problem with try/catch, Aaron Ecay, 2015/04/23
- Re: [O] ob-R, problem with try/catch,
Thomas S. Dye <=
- Re: [O] ob-R, problem with try/catch, Nicolas Goaziou, 2015/04/26
- Re: [O] ob-R, problem with try/catch, Charles C. Berry, 2015/04/26
- Re: [O] ob-R, problem with try/catch, Nicolas Goaziou, 2015/04/26
Re: [O] ob-R, problem with try/catch, Thomas S. Dye, 2015/04/23