[Rd] methods vs. functions
Claudia Beleites
cbeleites at units.it
Mon Dec 22 15:40:12 CET 2008
Dear List,
a second, more general, question concerning S4 classes.
I have a bunch of functions/methods for my class.
At the moment I have them as methods, because they work on objects of my S4
class and therefore "belong" to that class.
On the other hand, it is comparably unlikely that someone else wants the same
kind of method.
And package.skeleton () produces the xzy-methods.Rds. But for the
documentation I rather need "normal" function definitions. I know that I can
write the Rd files just as if it was a normal function, but this got me to ask
myself whether it is a good idea to have methods or whether I should rather
use "normal" functions?
If I understood the concept of namespace correctly, a package with a namespace
avoids trouble with clashing function names - so I don't need to worry about
that using functions (I anyways have some functions, that should not be
methods of the class).
Any comments?
Thanks a lot!
Claudia
--
Claudia Beleites
Dipartimento dei Materiali e delle Risorse Naturali
Università degli Studi di Trieste
Via Alfonso Valerio 6/a
I-34127 Trieste
phone: +39 (0 40) 5 58-34 47
email: cbeleites at units.it
More information about the R-devel
mailing list