Dear R Help, Why is it that if you try to return more than one objects using return(), it says it is 'deprecated'? So how do I return more than 1 objects back to the parent function? Thanks, Tim
Well, put it in a list and return that list. It's all written in ?return by the way. Timothy.Mak at iop.kcl.ac.uk wrote:> Dear R Help, > > Why is it that if you try to return more than one objects using return(), > it says it is 'deprecated'? So how do I return more than 1 objects back to > the parent function? > > Thanks, > > Tim > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
On 12/18/2006 6:06 AM, Timothy.Mak at iop.kcl.ac.uk wrote:> Dear R Help, > > Why is it that if you try to return more than one objects using return(), > it says it is 'deprecated'? So how do I return more than 1 objects back to > the parent function?Put them in a list, e.g. return(a,b) should be coded as return(list(a,b)) Duncan Murdoch