[Rd] generic function argument list problem

From: Robin Hankin <r.hankin_at_noc.soton.ac.uk>
Date: Wed 31 Aug 2005 - 07:09:15 GMT


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

R-devel@r-project.org mailing list
Received on Wed Aug 31 17:19:02 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:19 GMT