From ggrothendieck at gmail.com  Thu May 11 03:29:46 2006
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Wed, 10 May 2006 21:29:46 -0400
Subject: [Rd] What is callGeneric used for?
In-Reply-To: <m2u07xmzdd.fsf@ziti.local>
References: <m2u07xmzdd.fsf@ziti.local>
Message-ID: <971536df0605101829s41bc0f5bk7573ba595e82bf75@mail.gmail.com>

In the case of arithmetic methods you might not know or care
whether the generic is, say, + or -.

On 5/10/06, Seth Falcon <sfalcon at fhcrc.org> wrote:
> I've recently come across two pieces of code using calls to
> callGeneric() inside the definition of a method.
>
> In both cases, it appears to me that the callGeneric call could be
> replaced with a "real" call to the generic, say foo(x) instead of
> callGeneric(x) inside method foo.
>
> My understanding from the docs is that when called with arguments, it
> is just like calling the actual generic.  Clear enough, but what does
> this provide that just calling the actual generic doesn't?
>
> Similarly, when would one want to make the recursive call that results
> from calling callGeneric with no args?
>
> Thanks,
>
> + seth
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



[Rd] What is callGeneric used for?
Gabor Grothendieck