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
Ross Boylan <ross <at> biostat.ucsf.edu> writes:> 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?Take a look at collate field in DESCRIPTION file. This is from BioC wiki[1] "If you are using S4 classes or methods, add a Collate field to your package's DESCRIPTION file. Generally, class definitions come first, generics second, methods third, and then everything else." Gregor [1]http://wiki.fhcrc.org/bioc/Package_Guidelines