[R] setClass() and packages

Henrik Bengtsson hb at maths.lth.se
Tue May 21 09:18:14 CEST 2002


Where should the setClass() ('methods' package) calls be placed in a
package? I try to follow a one-class-one-file principe, but since
setClass("ClassA", "ClassB") has to come a after setClass("ClassB", [snip])
it is not possible to fully follow this rule. So the best I can do now is to
put all setClass() calls in a file named "000.R" (I know this file is *not*
guaranteed to be included first, but it works with current build script):

  setClass("ClassB", [snip])
  setClass("ClassA", "ClassB")
  ...

Doing like this is fine with me, but is this the correct/best way? How are
other people dealing with this "problem"?

[R v 1.5.0 2002-04-29 on WinMe]

Thanks

Henrik Bengtsson

Dept. of Mathematical Statistics @ Centre for Mathematical Sciences
Lund Institute of Technology/Lund University, Sweden (+2h UTC)
Office: P316, +46 46 222 9611 (phone), +46 46 222 4623 (fax)
h b @ m a t h s . l t h . s e, http://www.maths.lth.se/bioinformatics/


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list