[inlinedocs] A bug and a suggestion for S3 methods support

Toby Dylan Hocking Toby.Hocking at inria.fr
Mon May 17 12:11:18 CEST 2010


Thanks for your contributions, Philippe! It seems you have given this
a lot of thought, so I have added you to the R-Forge project.  Please
add your code contributions to SVN.

Your idea to put examples in the "ex" attribute is nice since you can
define the examples right below the function definition, but there are
2 problems that I can see.

1. you have to repeat yourself when you name the function twice: once
in the definition (FUN <- function) and once in the example definition
(attr(FUN,"ex") <-)

2. the code is actually encoded as a text string, which makes it more
difficult to read (it is highlighted like text). Why not make it a
function instead of a text string?

attr(FUN,"ex") <- function(){
 some example code
}

I guess for the time being you can use the ##S3method<< tag, go ahead
and add that!

Your idea for adding option(inlinedocs.exdir=...) is good, add that!

All these bugfixes are great, please add them!


More information about the Inlinedocs-support mailing list