[Rd] generic function argument list problem
Robin Hankin
r.hankin at noc.soton.ac.uk
Wed Aug 31 09:09:15 CEST 2005
Hi
it says in R-exts that
A method must have all the arguments of the generic,
including ... if the generic does.
A method must have arguments in exactly the same order as the
generic.
A method should use the same defaults as the generic.
So, how come the arguments for rep() are (x, times, ...) and the
arguments
for rep.default() are (x, times, length.out, each, ...) ? Shouldn't
these be the same?
I am writing a rep() method for objects with class "octonion", and
my function rep.octonion() has argument list (x, times, length.out,
each, ...)
just like rep.default(), but R CMD check complains about it, pointing
out that rep() and rep.octonion() have different arguments.
What do I have to do to my rep.octonion() function to make my package
pass R CMD check without warning?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
More information about the R-devel
mailing list