emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] multiple result outputs from function
@ 2010-03-16 18:26 Graham Smith
  2010-03-16 18:35 ` Dan Davison
  2010-03-16 18:39 ` Erik Iverson
  0 siblings, 2 replies; 7+ messages in thread
From: Graham Smith @ 2010-03-16 18:26 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-03-16 19:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-16 18:26 [babel] multiple result outputs from function Graham Smith
2010-03-16 18:35 ` 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

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).