[Rd] R CMD check, NAMESPACE, import: bad error?

Berwin A Turlach berwin at maths.uwa.edu.au
Fri Jan 20 05:47:42 CET 2006


G'day Seth,

>>>>> "SF" == Seth Falcon <sfalcon at fhcrc.org> writes:

    SF> I'm seeing errors with R CMD check that I don't understand
    SF> when checking a package that uses a NAMESPACE file with an
    SF> import directive.
I came sometime ago across a similar problem and it took me some time
to figure it out.  In my case it was that a .Fortran() call didn't
have a "package=" argument.  My advise would be to check all .C() and
.Fortran() calls in your package and add the "package=" argument if it
is missing.

I also guess that if you temporarily remove the NAMESPACE file, the
following step in the checking process:

      * checking foreign function calls ... WARNING
      Error: package/namespace load failed for 'DNAhelperseth'
      Call sequence:
      2: stop(gettextf("package/namespace load failed for '%s'", libraryPkgName(package)),        call. = FALSE, domain = NA)
      1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE)
      Execution halted
      See section 'System and foreign language interfaces' of the 'Writing R
      Extensions' manual.

will tell you which call the culprit is.  

Cheers,

        Berwin



More information about the R-devel mailing list