emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Graham Smith <myotisone@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [babel] multiple result outputs from function
Date: Tue, 16 Mar 2010 18:26:44 +0000	[thread overview]
Message-ID: <2c75873c1003161126r36c5e2c0kfa3f3540bf9ec7cf@mail.gmail.com> (raw)

Below is a function that I am trying to run in orgmode/babel.

It seems to run OK, but instead of printing out three values, its only
printing the final result.

Once again, i would appreciate some help with what I am missing.

Thanks,

Graham


#+srcname: CI_function
#+begin_src R :session daf
summary.ci<-function(x){
xbar<-mean(x)
sigma<-sd(x)
n<-length(x)
sem<-sigma/sqrt(n)
lower.ci<-xbar+sem*qnorm(0.025)
upper.ci<-xbar+sem*qnorm(0.975)
print (xbar)
print  (lower.ci)
print  (upper.ci)
}
#+end_src

#+srcname: SumFlowering2005
#+begin_src R :session daf
summary.ci(daf$Flower[daf$YEAR=="2005"])
#+end_src

#+results: SumFlowering2005
: 1.97860201016947

             reply	other threads:[~2010-03-16 18:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16 18:26 Graham Smith [this message]
2010-03-16 18:35 ` [babel] multiple result outputs from function Dan Davison
2010-03-16 18:43   ` Graham Smith
2010-03-16 18:39 ` Erik Iverson
2010-03-16 18:53   ` Graham Smith
2010-03-16 19:26     ` Dan Davison
2010-03-16 19:38       ` Graham Smith

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=2c75873c1003161126r36c5e2c0kfa3f3540bf9ec7cf@mail.gmail.com \
    --to=myotisone@gmail.com \
    --cc=emacs-orgmode@gnu.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).