I have been running R CMD check for the first time on of our own  
packages, which otherwise builds, installs and runs just fine. The  
package depends on package akima and suggests package multtest;  
suggesting multtest is indicated because a) it loads a lot of other  
Bioconductor packages, very slowly, and b) it is only needed for one  
specific subroutine, which executes require(multtest) every time it's  
called.

Now, when I run R CMD check on our package, it terminates when  
checking the examples in the documentation, claiming that

Error in .C("get_stat", as.double(tmp$X), as.integer(tmp$m),  
as.integer(tmp$n),  :
         "C" function name not in DLL for package 'multtest'
Execution halted

A closer look at  the output in the -Ex.Rout file shows that this  
does indeed happen when calling the function mt.teststat in multtest,  
to which this piece of code belongs. It also shows however, that this  
only happens in the *second* chunk of example code containing the  
calling function; before that, three calls to the offending function  
in the first chunk (ie in a different .Rd file) are executed just  
fine. Furthermore, if I change the status of multtest from Suggests  
to Depends in the DESCRIPTION file, R CMD check processes our package  
without problem.

My impression is that R gets confused when re-loading multtest for  
the second chunk of example code (for what it's worth, the  
offending .C("get_stat"...) does have a PACKAGE argument).

My question now: Is there any way of avoiding this problem without  
loading multtest by default? Would e.g. using a namespace help? If  
so, how specifically? Etc.?

Thanks for your time (and expertise),

alexander


platform powerpc-apple-darwin7.9.0
arch     powerpc
os       darwin7.9.0
system   powerpc, darwin7.9.0
status   Patched
major    2
minor    1.0
year     2005
month    05
day      12
language R


Alexander.Ploner@ki.se
Medical Epidemiology & Biostatistics
Karolinska Institutet, Stockholm
Tel: ++46-8-524-82329
Fax: ++46-8-31 49 75



	[[alternative HTML version deleted]]


