[Rd] troubles with R CMD check and examples under Ubuntu gutsy

Berwin A Turlach statba at nus.edu.sg
Mon May 5 09:16:59 CEST 2008


G'day Patrick,

since you seem to be hell-bent on having r-devel in this discussion, I
guess I might CC this there too.  :)

On Mon, 05 May 2008 08:50:04 +0200
Patrick Giraudoux <patrick.giraudoux at univ-fcomte.fr> wrote:

> There has been a threat on something similar in R-devel on August 
> 2007...  but I cannot understand the meaning.

It might be a good idea to provide a link to that discussion.  Perhaps
others can understand the meaning and judge the relevance to this
thread.

> > Did you look at the file in pgirmess.Rcheck that I mentioned?  
> You'll find a copy of pgirmess-Ex.R, but I cannot get what is the 
> meaning of this file...

This file collects all the code in the example sections of your
documentation file, and puts some necessary code in front, in between
the examples and at the end.  This file is then sourced to run all the
examples and the output can be found in pgrimess-Ex.Rout.  And it was
this file that I suggested you look at to see if it provides further
clues about what goes wrong.

> > Also, did you try to load the version of the library in
> > pgrimess.Rcheck in a R session and check if you find the PermTest
> > function in that case? 
> Yes indeed. I found PermTest in the R folder and in the R-ex folder
> of the pgirmess folder in the pgirmess.Rcheck folder.

I am surprised to hear this.  R-ex holds all the code from the example
sections in the Rd files, so it is no surprise that you will find a
file PermTest.R in the R-ex folder, it just contains the code from the
example section of PermTest.Rd, at last on my machine.  It definitely
does not contain the definition of the funcion.  And on my machine,
after running `R CMD check' on the tar.gz file, the R folder in
pgirmess.Rcheck/pgirmess contains the files pgirmess, pgirmess.rdb and
pgirmess.rdx, but no files with R code.  So how did you find PermTest
in the R folder?  Is lazy-loading somehow switched off in your version
of `R CMD check'?

> > With these problems, I am a bit of a trial-and-error person, so if I
> > cannot reproduce the error, I cannot find out what the problem
> > is....
> Thanks anyway for the hints. It may help.

I would suggest the following:

1) remove the directore pgirmess.Rcheck
2) run `R CMD check pgirmess' and see if the error occurs again
3) look at pgirmess.Rcheck/pgirmess/R.  Does it contain the three files
   that I mentioned or the original source files.  If the latter,
check whether PermTest.R is in that directory and whether it really
contains the commands that define that function.  If the former, start
an R session and issue the following commands:

R> env <- new.env()
R> lazyLoad("/path/to/pgirmess.Rcheck/pgirmess/R/pgirmess", envir=env)
R> ls(envir=env)

Make sure to replace the /path/to part above with the correct path.  Do
you see the PermTest function listed?

This should establish whether the file that contains the PermTest
function is part of the sources that you believe make up your package
source.  At the moment, I am leaning towards agreeing with Brian that
the most likely reason for your problem is that the PermTest function
got lost from your sources and is not installed.

Best wishes,

	Berwin



More information about the R-devel mailing list