emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] [babel] multiple result outputs from function


From: Graham Smith
Subject: [Orgmode] [babel] multiple result outputs from function
Date: Tue, 16 Mar 2010 18:26:44 +0000

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 via email to

[Prev in Thread] Current Thread [Next in Thread]