For the last few versions of R (don't remember when the change happened now), you need to explicitly wrap the objects in a list, instead of simply having them in return(). I.e., instead of return(a=thing1, b=thing2), you simply use list(a=thing1, b=thing2) as the last line of the function.
Andy From: Krish Krishnan > > In my function I am trying to return multiple computed items > (separated by commas). The function does what I need, but I > get a warning message that multi-argument returns are > deprecated. Is this a warning I should heed, or is there a > more elegant and warning free way of achieving the same end? Thanks > > > > --------------------------------- > > > [[alternative HTML version deleted]] > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
