Skip to content
Prev 43958 / 63424 Next

Package "datasets" not exporting anything on a recent R-2.15.1-patched

On 2012-08-27 11:32, Uwe Ligges wrote:
Exactly. This is making us agree that datasets are indeed just objects 
in a package.
Yet having it in a namespace would not cause any harm, wouldn't it ?

Having it in a namespace would also have the added benefits:
- loading up a dataset will not overwrite silently any existing dataset 
currently in .GlobalEnv
- should an identical name for a dataset be found in several packages, 
one could refer to it with the "::" operator. I am aware of the argument 
"package" to the function "data()", but regret the apparent lack of 
general rule.
- should one wish to list the objects defined (and eventually exported) 
by a package the use of one function would be sufficient.

May be I am missing a fundamental point, but if my memory is correct the 
package "datasets" used to list its data objects when 
getNamespaceExports() was called.