From maechler at stat.math.ethz.ch  Tue Jun  1 08:32:38 2004
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Tue Jun  1 08:32:42 2004
Subject: [Rd] Problem with .First.lib while running R CMD check 
In-Reply-To: <40BB6107.5040001@vanderbilt.edu>
References: <40BB6107.5040001@vanderbilt.edu>
Message-ID: <16572.8966.59739.966023@gargle.gargle.HOWL>

>>>>> "Frank" == Frank E Harrell <f.harrell@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


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