[Rd] operator :: and symbols not in the namespace of a package with a namespace
Seth Falcon
sfalcon at fhcrc.org
Wed Oct 11 16:29:48 CEST 2006
Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
> The reason was (and is) that if datasets are in the namespace, functions
> in the namespace find them ahead of a dataset of the same name in the
> user's workspace.
That this is desirable seems to be where opinions differ. The
Bioconductor project distributes many so-called data packages and
having the data protected by the package namespace would be an
improvement.
It also makes things easier to explain to new users. Once the
namespace concept is understood, one doesn't need to also learn about
data being an exception.
> (This broke the MASS scripts, for example, and also
> affects car.) (We do have a mechanism to put system datasets in the
> namespace where this is the desired behaviour, but it seems
> uncommon.)
I will investigate whether this mechanism would suit our needs, but my
impression is that it is less flexible than the data mechanism. In
particular, one has to have a single rda file and make use of
lazy-loading which has serious performance implications for users
installing from source.
> I really don't fancy explaining to our beginning students that when
> they are asked to correct some entries in a dataset some functions
> will see the corrected version and some the original if they just
> use fix().
Explaining this concept to students could be difficult, but don't they
need to understand this namespace concept when they modify functions?
+ seth
--
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org
More information about the R-devel
mailing list