From ross at biostat.ucsf.edu  Thu Dec 28 21:15:58 2006
From: ross at biostat.ucsf.edu (Ross Boylan)
Date: Thu, 28 Dec 2006 12:15:58 -0800
Subject: [Rd] setGeneric and file order in a package
Message-ID: <20061228201558.GB23253@wheat.betterworld.us>

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



[Rd] setGeneric and file order in a package
Ross Boylan