[Rd] Problem with .First.lib while running R CMD check

Martin Maechler maechler at stat.math.ethz.ch
Tue Jun 1 08:32:38 CEST 2004

>>>>> "Frank" == Frank E Harrell <f.harrell at vanderbilt.edu>
>>>>>     on Mon, 31 May 2004 18:44:55 +0200 writes:

    Frank> I am having difficulty running R CMD check using the
    Frank> 30May04 version of R-devel and a new version of the
    Frank> Hmisc package:

    Frank> * checking S3 generic/method consistency ... WARNING
    Frank> Error in .tryQuietly({ : Error in library(package, lib.loc = lib.loc, 
    Frank> character.only = TRUE, verbose = FALSE) :
    Frank> .First.lib failed
    Frank> Execution halted

    Frank> See section 'Generic functions and methods' of the
    Frank> 'Writing R Extensions' manual.

I'm not sure, but I'd guess it's simply the last line of your
.First.lib. that fails, i.e.,
    library.dynam("Hmisc", pkg, lib)
which fails loading the C/Fortran code.
I've had similar experiences.  The 'R CMD check' error message
is definitely ``sub optimal''.

Simply try (in R-devel)

   library(Hmisc, lib.loc="~/R/Hmisc.Rcheck")

This should give a much better error message.
Let us know if this helped.

Regards, Martin

More information about the R-devel mailing list