[Rd] Re: [R] R-2.0.0 CMD check . and datasets

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Sep 14 12:34:05 CEST 2004

This is question about the the development version of R and should have 
gone to the R-devel list according to the posting guide.

  R-devel is intended for questions and discussion about code development 
  in R. Questions likely to prompt discussion unintelligible to non-programmers 
  should go to to R-devel. 

Did you read the NEWS for that version, and did you look at the notes on 
developer.r-project.org for 2.0.0 (as posted to the R-devel list 
recently)?  If not, please do so now.

Please, as the FAQ asks, don't give us an incorrect explanation but facts.
Your problem *appears* to be that you have ignored the following statement
in `Writing R Extensions':

  Note that R code should be "self-sufficient" and not make use of extra 
  functionality provided by the package, so that the data file can also be 
  used without having to load the package.

and as the notes for 2.0.0 say, this is now enforced.  As you have 
quibbled once before, let me stress this a pre-existing error that is now 

On Tue, 14 Sep 2004, Robin Hankin wrote:

> Hello everyone
> I'm having a little difficulty with R-2.0.0 CMD check.  My field is 
> Bayesian calibration of computer models.
> The problem is  that I have a large collection of toy datasets, that 
> in R-1.9.1 were specified with lines
> like this:
> x.toy <- 1:6
> y.toy <- computer.model(x.toy)
> z.toy <- reality(x.toy)
> in file ./data/toys.R ; functions computer.model() and reality() are 
> defined in ./R/calibrator.R.
> [In this application,  the (toy) functions computer.model() and 
> reality() are the objects of inference, as
> per the standard Bayesian approach.  The functions are nonrandom in 
> that they are deterministic but
> random in the Bayesian sense.  Thus y.toy and z.toy are observations 
> of (random) functions].
> In the Real World, one would have access to x.toy, y.toy, and z.toy 
> but not (of course) computer.model()
> or reality().  These functions should never be seen or referred to 
> because they are Unknown.
> So, in many of the code examples, I use  things like 
> "some.function(y.toy, z.toy)" . . . and  I need
> y.toy and z.toy to be consistent between different functions.
> I think R-2.0.0 sources ./data/toys.R *before* the files in ./R/   ; 
> and this throws an error in
> R2 CMD check, because the functions are not found.
> What is best practice to generate this kind of toy dataset?

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-devel mailing list