[R] return()

Duncan Murdoch murdoch at stats.uwo.ca
Mon Dec 18 14:08:34 CET 2006


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



More information about the R-help mailing list