[R] Create a function with multiple object as an output

Sarah Goslee sarah.goslee at gmail.com
Wed Nov 16 03:09:44 CET 2011


On Tue, Nov 15, 2011 at 4:10 PM, anaraster <rrasterr at gmail.com> wrote:
> I've seen some questions regarding the output of multiple objects from a
> function, however the suggestions  all end up suggesting the use of
> return(list(result1=result1, result2=result2 , result3=result3)).
> How can I return multiple objects that are 2 big to be added to a list?

I'm not sure what you mean: what kind of objects are too big to add to a list?

An example would be useful here. A list is the correct way to return multiple
results, and that's what R functions do, even the ones that return large


Sarah Goslee

More information about the R-help mailing list