From sven.templer at gmail.com  Mon Aug  4 16:22:49 2014
From: sven.templer at gmail.com (Sven E. Templer)
Date: Mon, 4 Aug 2014 16:22:49 +0200
Subject: [Rd] abs, dots and an S4 method.
Message-ID: <CAHuTOvpFoez_5t4dTjdL+p+MSJg+4jRxTptPp_eBk=FN=NXKqw@mail.gmail.com>

Hello,

using the primitive abs(x) does not allow more than just the 'x'
argument in an S4 method, e.g. abs(x, arg2), since there is no '...'
as in trunc(x, ...).

To add a ... argument to abs(x), is it sufficient to change the arity
in src/main/names.c for abs as in trunc to a value of '-1'? So it
allows any number of arguments, not only 1? Or do I miss something
about it?

I found no clue checking the src/main/arithmetic.c do_abs and
do_trunc, or as proposed in R internals the do_switch in
src/main/builtin.c.

It would be very nice to have an abs S4 method, so to have the dots in there.

Thank you!
Sven.



[Rd] abs, dots and an S4 method.
Sven E. Templer