Skip to content
Prev 43954 / 63424 Next

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

On 2012-08-26 19:27, Prof Brian Ripley wrote:
I am seeing two ways for datasets to be used:
A- as internal data for necessary to a function in a package (e.g, 
conversion tables). Not very frequent, from my limited experience.
B- as example data, used in the documentation. The most frequent usage.

For A/, the user is not expected to modify the data.
For B/, the data are typically passed to functions (to use an example 
from MASS, "huber(chem)").
I thought a bit about it, but still do no see where exactly this would 
be a problem.

An other example available in R is the vector "letters" (in base). It 
can be thought of as a dataset, yet it is
- in a namespace

 > "letters" %in% getNamespaceExports(getNamespace("base"))
[1] TRUE

- probably used in the two situations A/ and B/ above.