Skip to content
Prev 273575 / 398506 Next

reporting multiple objects out of a function

On 10/05/2011 09:14 PM, andrewH wrote:
Hi,

As I understand it, you want to return multiple arguments without
returning them explicitly as an object. This can probably be done, by I
would advice against it because it makes your code harder to read. You
dump something in the calling environment, and a new user (maybe
yourself in a few months) has to do a lot of reasoning of what is
happening under the hood, which object is dumped in which environment. I
would just return a list. Alternatively, take a look at object oriented
programming like Gabor suggested. This, however, still involves
returning an object...

Again, I would recommend doing this the standard R way....

cheers,
Paul