[Rd] setGeneric and file order in a package

From: Ross Boylan <ross_at_biostat.ucsf.edu>
Date: Thu 28 Dec 2006 - 20:15:58 GMT

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...

Ross Boylan

R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Dec 29 14:41:45 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 29 Dec 2006 - 10:31:05 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.