Re: R-beta: return()

Peter Dalgaard BSA (p.dalgaard@kubism.ku.dk)
25 Sep 1997 19:35:35 +0200


To: Bill Simpson <wsimpson@uwinnipeg.ca>
Subject: Re: R-beta: return()
From: Peter Dalgaard BSA <p.dalgaard@kubism.ku.dk>
Date: 25 Sep 1997 19:35:35 +0200
In-Reply-To: Bill Simpson's message of Thu, 25 Sep 1997 12:07:31 -0500 (CDT)

Bill Simpson <wsimpson@uwinnipeg.ca> writes:

> thingy<-function(k)
> {
> x<-5+k
> y<-5-k
> return(list(x=x,y=y))
> }
> 
> thingy2<-function()
> {
> thingy(10)
> cat("x,y:",x,y,"\n")
> }

Try
thingy2<-function()
{
l<-thingy(10)
cat("x,y:",l$x,l$y,"\n")
}


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=