emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Exporting output and graphics from R
Date: Fri, 31 May 2013 14:25:08 +0200	[thread overview]
Message-ID: <867gif5obf.fsf@somewhere.org> (raw)
In-Reply-To: loom.20130531T140705-82@post.gmane.org

SabreWolfy,

SabreWolfy wrote:
> Sebastien Vauban <sva-news@...> writes:
>> AFAICT, you can't have both at the same time. Do you have a real
>> use case for this?
>
> Maybe I'm not using the right tool for the job. I thought it would be useful
> to be able to intersperse explanatory text with output:
>
> All crows are black. We know this from looking at crows. I analyzed a
> dataset using this code, and produced a graph as follows:
>
> #+BEGIN_SRC R :results graphics :file testout.png :exports both
> # load data, analyze, make graph
> #+END_SRC
>
> The above analysis shows that all crows are black. A table of observed
> results is as follows:
>
> #+BEGIN_SRC R :results
> # more R code using the same dataset
> # will only work if the dataset is loaded again
> #+END_SRC
                          ^^^^^^^^^^^^^^^^^^^^^^^
because you don't use the ":session" header argument. Look at it.

> This can be summarized with the following results:
> #+BEGIN_SRC R :results graphics :file testout.png :exports both
> # R code plotting another graph and showing another output table
> #+END_SRC

Use ":noweb yes" and references to named code blocks.

> My idea is that I would like the R code included for my reference when
> reading the document. I would also like the explanatory text, etc. included,
> as well as the output and results for the people who will be reading the
> document.

Of course, that's the whole point of using Org + Babel. Thanks Eric and Dan,
once again...

> Easier just to do it all in LaTeX directly? But then the code is not live,
> like it is in Org.

N/A

Best regards,
  Seb

-- 
Sebastien Vauban

      reply	other threads:[~2013-05-31 12:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 12:07 Exporting output and graphics from R SabreWolfy
2013-05-30 12:24 ` Sebastien Vauban
2013-05-30 12:47   ` Rainer M. Krug
2013-05-30 13:15     ` Feng Shu
2013-05-30 13:37       ` Rainer M. Krug
2013-05-31 12:15       ` SabreWolfy
2013-05-31 12:13   ` SabreWolfy
2013-05-31 12:25     ` Sebastien Vauban [this message]

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=867gif5obf.fsf@somewhere.org \
    --to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /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).