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

Philippe Grosjean phgrosjean at sciviews.org
Fri May 14 17:25:28 CEST 2010


Hello,

Thanks for the inlinedocs package. I have hit a bug. In the test file 
attached to this email, if I use:

return(x)

instead of:

x

in the last instruction of the combine.list() function, 
package.skeleton.dx() fails with the following message:

:> package.skeleton.dx("~/Desktop/pkg/inlinedocs2")
extract.docs.file parsefun author.from.description erase.format 
title.from.name examples.from.testfile examples.after.return Error in  
l[[2]] : subscript out of bounds

Also, a little suggestion: in the usage section of Rd files, S3 methods 
are supposed to be written:

\method{print}{object}(....)

instead of:

print.object(....)

It is not possible to detect easily if a function is a S3 method, but 
may be could you use a special indication to flag this, and then, write 
usage section correctly? This could be something like:

print.object <- function (
##<<method<<print<<object
x,   ##<< the object to print
...  ##<< further arguments
) {
<code here>
}

Best,

Philippe

-- 
..............................................<°}))><........
  ) ) ) ) )
( ( ( ( (    Prof. Philippe Grosjean
  ) ) ) ) )
( ( ( ( (    Numerical Ecology of Aquatic Systems
  ) ) ) ) )   Mons University, Belgium
( ( ( ( (
..............................................................



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Test.R
URL: <http://lists.r-forge.r-project.org/pipermail/inlinedocs-support/attachments/20100514/d7df6c5b/attachment.asc>


More information about the Inlinedocs-support mailing list