[R] retrieve from function

Ista Zahn istazahn at gmail.com
Fri Feb 19 18:56:06 CET 2010


Hi Robert,

You need to modify your function to return a value. Something like

 x <- function(nbr){
   y<-rnorm(nbr)
   y1 <- mean(y)
   plot(y)
   return(y1)
 }


-Ista



More information about the R-help mailing list