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

Frank E Harrell Jr f.harrell at vanderbilt.edu
Mon May 31 18:44:55 CEST 2004


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

* checking S3 generic/method consistency ... WARNING
Error in .tryQuietly({ : Error in library(package, lib.loc = lib.loc, 
character.only = TRUE, verbose = FALSE) :
         .First.lib failed
Execution halted
See section 'Generic functions and methods' of the 'Writing R Extensions'
manual.
* checking for replacement functions with final arg not named 'value' 
... WARNING
Error in .tryQuietly({ : Error in library(package, lib.loc = lib.loc, 
character.only = TRUE, verbose = FALSE) :
         .First.lib failed
Execution halted
* checking foreign function calls ... WARNING
Error in .tryQuietly({ : Error in library(package, lib.loc = lib.loc, 
character.only = TRUE, verbose = FALSE) :
         .First.lib failed
Execution halted

Here is the .First.lib in question:

.First.lib <- function(lib, pkg, verbose=TRUE, ...) {
   if(verbose)
     cat("Hmisc library by Frank E Harrell Jr\n\n",
         "Type library(help='Hmisc'), ?Overview, or ?Hmisc.Overview')\n",
         "to see overall documentation.\n\n",
         "Hmisc redefines [.factor to drop unused levels of factor 
variables\n",
         "when subscripting. To prevent this behaviour, issue the 
command\n",
         "options(drop.unused.levels=F).\n\n",
         sep='')
   library.dynam("Hmisc", pkg, lib)
   invisible()
}

Per an earlier suggestion from Kurt Hornik I tried ./configure 
--enable-shared when building R-devel (I'm running on Debian linux 
unstable/testing (Knoppix 3.4)) but this did not fix the problem.  The 
Hmisc.so file looks like:

~/R/Hmisc.Rcheck/Hmisc/libs harrelfe:ls -la
-rwxr-xr-x    1 harrelfe harrelfe    37524 2004-05-31 18:31 Hmisc.so

Under R-devel I can source('~/R/Hmisc.Rcheck/Hmisc/R/Hmisc') with no errors.

I would appreciate any help.

Thanks,
Frank
-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University



More information about the R-devel mailing list