[inlinedocs] Problems with S4 method definitions

Markus Müller markus.mueller.1.g at googlemail.com
Fri Nov 18 20:46:56 CET 2011


Hi
I very much like the Don't Repeat Yoursels principle behind inlinedocs and
am thankful to use it.
To do so there are still some obstacles to be overcome however.
Hopefully somebody can help me there.

Here comes the problem:
Inlinedocs raises an error message when confronted with the following piece
of code:

setClass("Trajectories", # a class that meausures
### This class serves
   representation(
    times="numeric", ##<< bal
    traj="matrix"   ##<< bla
   )
)
setMethod(
   f= "plot",
   signature= "Trajectories",
   definition=function (x,y,...){
      matplot(x at times,t(x at traj),xaxt="n",type="l",ylab= "",xlab="", pch=1)
      axis(1,at=x at times)
   }
)

The message is:
extra.code.docs prefixed.lines Error in UseMethod("combine") :
  no applicable method for 'combine' applied to an object of class "NULL"
Calls: package.skeleton.dx ... apply.parsers -> combine -> combine.list ->
combine
Execution halted

without the setMethod(...) part everything woks fine as in the "sliiy"
example.

This leads me to the following questions.


   1. At the moment I use *package.skeleton.dx* to produce the
   documentation, which fails with the above message.
   Is there a possibility to avoid this kind of problem with a smarter
   call?
   (For instance applying inlinedocs only to
   those files known to have no problems)
   2. If I have to change the code of the inlinedocs package. How would you
   suggest to tackle the problem with minimum effort.
      1. write a new  *package.skeleton.dx *with an additional argument
      describing files that should be excluded
      2. change a parser (which one?) so that setMethod( ) is ignored ?
      3. ...

Thanks in advance
Markus

p.s. I am quite new to R ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/inlinedocs-support/attachments/20111118/b1bad2f0/attachment.htm>


More information about the Inlinedocs-support mailing list