From sfalcon at fhcrc.org  Wed Oct 11 16:29:48 2006
From: sfalcon at fhcrc.org (Seth Falcon)
Date: Wed, 11 Oct 2006 07:29:48 -0700
Subject: [Rd] operator :: and symbols not in the namespace of a package
	with a namespace
In-Reply-To: <Pine.LNX.4.64.0610091611110.17674@gannet.stats.ox.ac.uk> (Brian
	Ripley's message of "Mon, 9 Oct 2006 16:18:13 +0100 (BST)")
References: <20061006130505.A50374BEC2@slim.kubism.ku.dk>
	<45265A8A.6060505@stats.uwo.ca>
	<Pine.LNX.4.64.0610060938000.7912@nokomis.stat.uiowa.edu>
	<Pine.LNX.4.64.0610091611110.17674@gannet.stats.ox.ac.uk>
Message-ID: <m28xjn6i3n.fsf@ziti.local>

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




[Rd] operator :: and symbols not in the namespace of a package with a namespace
Seth Falcon