[Rd] How to modify dots and dispatch NextMethod

Iñaki Úcar i.ucar86 at gmail.com
Thu Feb 22 12:07:22 CET 2018

2018-02-22 10:29 GMT+01:00 Tomas Kalibera <tomas.kalibera at gmail.com>:
> The example is invoking NextMethod via an anonymous function, which is not
> allowed (see documentation for NextMethod).

Thanks for your response. I definitely missed that bit.

> Normally one gets a runtime
> error "'NextMethod' called from an anonymous function", but not here as the
> anonymous function is called via do.call. I will fix so that there is a
> runtime error in this case as well, thanks for uncovering this problem.

Then I did well chosing this list! Please also note that you could
take that anonymous function out of the method and name it, and the
behaviour would be the same. So maybe this case should issue an error

> I don't think there is a way to replace (unnamed) arguments in dots for
> NextMethod.

That's a pity. IMHO, it should be some mechanism for that, but dots
are special in inscrutable ways.

Anyway, for anyone insterested, I found a workaround:


> Tomas


More information about the R-devel mailing list