emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: tsd@tsdye.com (Thomas S. Dye)
To: Rainer M Krug <r.m.krug@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>, "Charles C. Berry" <ccberry@ucsd.edu>
Subject: Re: ob-R, problem with try/catch
Date: Thu, 23 Apr 2015 13:36:41 -1000	[thread overview]
Message-ID: <m2oamebenq.fsf@tsdye.com> (raw)
In-Reply-To: <87h9s65v0x.fsf@gmail.com> (Aaron Ecay's message of "Thu, 23 Apr 2015 23:39:42 +0100")

Hi Aaron,

Aaron Ecay <aaronecay@gmail.com> 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

  reply	other threads:[~2015-04-23 23:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 22:03 ob-R, problem with try/catch Thomas S. Dye
2015-04-23  2:23 ` Charles C. Berry
2015-04-23  5:40   ` Rainer M Krug
2015-04-23 15:53     ` Thomas S. Dye
2015-04-23 16:20       ` Rainer M Krug
2015-04-23 16:42         ` Aaron Ecay
2015-04-23 16:13     ` Charles C. Berry
2015-04-23 16:29       ` Rainer M Krug
2015-04-23 17:11         ` Thomas S. Dye
2015-04-23 22:39           ` Aaron Ecay
2015-04-23 23:36             ` Thomas S. Dye [this message]
2015-04-26 12:49         ` Nicolas Goaziou
2015-04-26 17:11           ` Charles C. Berry
2015-04-26 17:28             ` Nicolas Goaziou
2015-05-04  8:35             ` Rainer M Krug
2015-05-04 19:03               ` Nicolas Goaziou
2015-04-23  6:35   ` Thomas S. Dye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2oamebenq.fsf@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=r.m.krug@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).