[Rd] setGeneric and file order in a package
Ross Boylan
ross at biostat.ucsf.edu
Thu Dec 28 21:15:58 CET 2006
Are there any assumptions I can make about the order in which
different files in the R package subdirectory will be evaluated? For
example, will it be alphabetical in the file names? Will case
distinctions be ignored?
I ask because I would like to use setGeneric, as in
setGeneric("foo", function(x) standardGeneric("foo")) and am wondering
where that should go.
I realize I could explicitly test for the existence of the generic in
each spot, and execute setGeneric as needed. That seems wasteful and
error prone.
Is there other recommended practice in setting generics? For example,
should I test for existence of a generic in the one spot I create it?
Since that seems like a half-measure (if a generic exists it may well
have different arguments) I suppose I should use namespaces...
Thanks.
Ross Boylan
More information about the R-devel
mailing list