emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Thomas S. Dye" <tsd@tsdye.com>
To: Vikas Rawal <vikaslists@agrarianresearch.org>
Cc: Emacs-orgmode mailing list <emacs-orgmode@gnu.org>
Subject: Re: [babel] html export of R data frame
Date: Mon, 19 Jul 2010 22:08:56 -1000	[thread overview]
Message-ID: <82422340-6228-457E-A111-567D4E408F76@tsdye.com> (raw)
In-Reply-To: <20100720031301.GA6691@panahar>


On Jul 19, 2010, at 5:13 PM, Vikas Rawal wrote:

>>
>> Is this what you want?
>>
>> #+BEGIN_SRC R :results value :exports both
>
> Indeed. Except that, in the functional mode, org-babel shows me output
> of only the last command, and not the intermediate commands.
>
> I am not too happy with that. When I do my data analysis, sometimes a
> program gives out several outputs. Let me see how would I handle that
> in the functional mode.
>
> Thanks anyway,
>
> Vikas
>


Aloha Vikas,

Here is one way to see intermediate values in functional mode.

#+srcname: vikas-x
#+begin_src R
  x<-c(1:5)
#+end_src

#+results: vikas-x
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |

#+srcname: vikas-y
#+begin_src R :var x=vikas-x
  y<-x^2
#+end_src

#+results: vikas-y
|  1 |
|  4 |
|  9 |
| 16 |
| 25 |

#+BEGIN_SRC R :results value :var x= vikas-x :var y= vikas-y :exports  
both
  data.frame(x,y)
#+END_SRC

#+results:
| 1 |  1 |
| 2 |  4 |
| 3 |  9 |
| 4 | 16 |
| 5 | 25 |

All the best,
Tom

      parent reply	other threads:[~2010-07-20  8:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20  2:27 [babel] html export of R data frame Vikas Rawal
2010-07-20  2:39 ` Thomas S. Dye
     [not found]   ` <20100720031301.GA6691@panahar>
2010-07-20  8:08     ` Thomas S. Dye [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=82422340-6228-457E-A111-567D4E408F76@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=vikaslists@agrarianresearch.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).