[R] .First.lib failed

Frank E Harrell Jr feh3k at spamcop.net
Thu Mar 18 18:36:02 CET 2004


Using R-devel of 2Mar04 on debian linux I am getting an error when running
/usr/local/src/R-devel/bin/R CMD check --no-clean Hmisc:


* 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

I remember having to solve this problem previously but I can't remember
how.

Contents of R/Hmisc/s/First.lib.s (main functions in Hmisc are in
R/Hmisc/R/Hmisc.R):

.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()
}

If I run /usr/local/src/R-devel/bin/R and type library(Hmisc) everything
is fine.

Thanks for any pointers.  -Frank Harrell




More information about the R-help mailing list