Hi, say I got the function:
> x=function(nbr){y<-rnorm(nbr);y1 <- mean(y);plot(y)}

how can I retrieve value of y1, when I need it. 

I don't want:
> x=function(nbr){y<-rnorm(nbr);y1 <<- mean(y);plot(y)}
> y1

I want someting like:
"x$y1" and then I get the value

Many thanks, robert





-- 
View this message in context: 
http://n4.nabble.com/retrieve-from-function-tp1561972p1561972.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to