[Rd] extended usage of data()

Paul Gilbert pgilbert at bank-banque-canada.ca
Mon Sep 15 13:14:22 MEST 2003


I would like to request a change to the documentation for data() so that 
a usage that already works in the code becomes officially recognized (in 
the help for data(), in Writing R Extensions, and in checkDocFiles()).

In a package I am just preparing to release I have  files 
data/CNDmoneyData.R  and data/CNDmoneyData.asof.26Aug2002.R.  Each of 
these define the same 26 variables, which are components of the Canadian 
monetary aggregates, but none are named CNDmoneyData. The idea is that 
future releases may have updated versions of the data, and files would 
be given names indicating their release date. The variables can all be 
loaded with

  data("CNDmoneyData", package="CDNmoney")
or
  data("CNDmoneyData.asof.26Aug2002", package="CDNmoney")

but this usage is not indicated in the documentation, and checkDocFiles 
in R 1.8.0 objects to it. It is somewhat inconvenient to load all the 
variables individually, in the way the currently documented usage would 
suggest. Futhermore, it would be extremely inconvenient to give new 
names to updated versions of variables, as implied by the currently 
documented usage, since that would require changing all references to 
the variables when referring to different released versions.

Paul Gilbert



More information about the R-devel mailing list