You can return a single object from a function. If you want multiple values, use a list:
f <- function(x,y,z){ .... return(list(x=x, y=y, z=z)) } value <- f(x,y,z) # now copy the values x <- value$x y <- value$y z <- value$z On Fri, Apr 16, 2010 at 12:02 PM, Gustave Lefou <gustave5...@gmail.com>wrote: > Dear R users, > > I have a function which takes as arguments big arrays, say : w, x , y and > z. > > My function changes these arrays and I want them as result/output. > > I have tried to write return(w,x,y,z), and thus to replace the previous w, > x, y and z. It does not seem to work. > > What can I do ? > > Thank you very much, > Gustave > > [[alternative HTML version deleted]] > > ______________________________________________ > 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<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? [[alternative HTML version deleted]] ______________________________________________ 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.