[Rd] strange bug? with R CMD check

Kjell Konis kjell.konis at epfl.ch
Tue Jul 21 15:32:53 CEST 2009


I am trying to get a package to pass R CMD check on an iMac running  
Mac OS X.  When the package is named safeBinaryRegression I get the  
following warning from R CMD check:

* checking whether the name space can be loaded with stated  
dependencies ... WARNING
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   function 'make_lp' not provided by package 'lpSolveAPI'
Calls: loadNamespace -> library.dynam -> dyn.load
Execution halted

A namespace must be able to be loaded with just the base namespace  
otherwise if the namespace gets loaded by a saved object, the session  
be unable to start.

Probably some imports need to be declared in the NAMESPACE file.

Here is the contents of the DESCRIPTION:

Package: safeBinaryRegression
Version: 0.1-2
Date: 2009-07-01
Title: Safe Binary Regression
Author: Kjell Konis <kjell.konis at epfl.ch>
Maintainer: Kjell Konis <kjell.konis at epfl.ch>
Depends: R (>= 2.9.1), lpSolveAPI (>=
LinkingTo: lpSolveAPI
Description: Overloads the stats::glm function so that a test for the  
existence of
   the maximum likelihood estimate is computed as part of the fitting  
procedure for
   binary regression models.
License: GPL-2

Here is the contents of the NAMESPACE:

useDynLib(safeBinaryRegression, linprog, reducedLP)

The strange thing is that if I change the length of the package name  
(for example safeBinaryRegression to safeBinaryRegress) the warning  
goes away and R CMD check completes successfully.  Also, regardless of  
the package name, the package installs and runs as expected.  I'm at a  
loss trying to figure out what's going on.

To reproduce:

(1) check out the sbr package (which passes R CMD check)

   svn checkout svn://svn.r-forge.r-project.org/svnroot/sbr/pkg  

(2) replace sbr with safeBinaryRegression in DESCRIPTION and NAMESPACE

(3) run R CMD check

Session Info:

 > sessionInfo()
R version 2.9.1 (2009-06-26)


attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base


More information about the R-devel mailing list