[Bioc-devel] NAMESPACE problem in globaltest, widgetTools and SAGElyzer

Seth Falcon sfalcon at fhcrc.org
Thu Nov 24 18:42:28 CET 2005

Hi Jelle,

Thanks for working on adding a NAMESPACE!

On 24 Nov 2005, J.J.Goeman at lumc.nl wrote:
> I've been trying to add a NAMESPACE to my globaltest package, but I
> get an error message when I run Rcmd check (R 2.2.0, WinXP) that I
> do not understand.
> This error happens to be exactly the same that I see in the package
> check results of the widgetTools package (1.7 release, solaris only)
> http://www.bioconductor.org/checkResults/1.7/SunOS-sun4u/widgetTools
> The same seems to happen in SAGElyzer (1.7 release, windows only):
> http://www.bioconductor.org/checkResults/1.7/Windows/SAGElyzer
> I also see that in both packages, the problem occurs only in the 1.7
> release, and not on devel.
> Does anybody (Jianhua?) know the origin of this error? I have no
> clue as to the cause of this error in my own package. It even occurs
> when I use a NAMESPACE with only one line
> useDynLib(globaltest)

Well, from here, it doesn't look like globaltest has any C or Fortran
code and so there is no globaltest dynamic library to load.  You only
need to use the useDynLib directive in the NAMESPACE file if your
package contains C code.

> Below is the error I get in globaltest when running Rcmd check. I
> ran Rcmd INSTALL first, which completed without errors. 

If you then started R and did library(globaltest) I think you
would have seen a message about not being able to load the dyn lib.
Certainly, the error messages could be *much* more helpful :-)

> And here's the content of my MAMESPACE file:

Works for me after removing the useDynLib line.

A few other things you will want to do:

1. Since you use S4 classes and methods, add a .onLoad function as
   described in the Writing R Extensions manual:

   .onLoad <- function(lib, pkg) require("methods")

2. Consider adding SaveImage: yes to DESCRIPTION

3. Don't forget to svn add the NAMESPACE file :-)


+ seth

More information about the Bioc-devel mailing list