Skip to content
Prev 17408 / 63424 Next

generic function argument list problem

On Wed, 2005-08-31 at 08:09 +0100, Robin Hankin wrote:
Shouldn't
pointing
I cannot repeat your problem. Probably you did something differently
than you said (like omitted "..." , misspelled times as time or
something else in your rep.octonion).

This is what I tried.

In R:
function (x, times, ...)
Creating directories ...
Creating DESCRIPTION ...
Creating READMEs ...
Saving functions and data ...
Making help files ...
Created file named './octonion/man/rep.octonion.Rd'.
Edit the file and move it to the appropriate directory.
Done.
Further steps are described in ./octonion/README

Then I edited octonion/man/rep.octonion.Rd so that it uses the generic
and passes R CMD check (virgin Rd files produced by package.skeleton
fail the test, which I found a bit weird). Here are the minimum changes
you need to pass the tests.

--- rep.octonion.Rd.orig        2005-08-31 10:56:36.000000000 +0300
+++ rep.octonion.Rd     2005-08-31 10:55:25.000000000 +0300
@@ -7,5 +7,5 @@
 }
 \usage{
-rep.octonion(x, times, length.out, each, ...)
+\method{rep}{octonion}(x, times, length.out, each, ...)
 }
 %- maybe also 'usage' for other objects documented here.
@@ -18,5 +18,5 @@
 }
 \details{
-  ~~ If necessary, more details than the __description__  above ~~
+  ~~ If necessary, more details than the description  above ~~
 }
 \value{
@@ -31,7 +31,7 @@
 \note{ ~~further notes~~ }

- ~Make other sections like Warning with \section{Warning }{....} ~

-\seealso{ ~~objects to See Also as \code{\link{~~fun~~}}, ~~~ }
+
+\seealso{ ~~objects to See Also as \code{\link{rep}}, ~~~ }
 \examples{
 ##---- Should be DIRECTLY executable !! ----
@@ -42,4 +42,4 @@
 function(x, time, length.out, each, ...) {}
 }
-\keyword{ ~kwd1 }% at least one, from doc/KEYWORDS
-\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
+\keyword{ models }% at least one, from doc/KEYWORDS
+

So this replaces rep.octonion with \method{rep}{octonion}, removes __
from description (these cause latex errors), remove a hanging top level
text "Make other sections...", and removes a link to non-existent
~~fun~~ (I'm not sure if adding a real keyword is necessary).

This passes tests. Including 

* checking S3 generic/method consistency ... OK

Conclusion: check your files. (It is pain: been there, done that.)

cheers, jari oksanen