[R] Error in load(dataFile, myEnv)

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Feb 1 16:39:32 CET 2005


Looks like you have your own version of a load() function around.  Try
?conflicts to see what you may have masked.

On Tue, 1 Feb 2005, Zhesi He wrote:

> Dear all,
>
> I just found that some of the packages are not able to load any more,
> after I installed R2.0.1 in my Mac, it even affects my old R1.8
> installs.
>
> It gives me errors when I load packages that contains "myEnv" settings.
> such as: RMySQL, DBI, Rggobi, etc. But others that does not require
> "myENV" is all right, like tcltk that only calls the c functions.
>
> The errors are like:
> Error in load(dataFile, myEnv) : unused argument(s) ( ...)
> Error in library(DBI) : .First.lib failed for 'DBI'
>
> I had a look at the package file that contains .First.lib,
>     fullName <- paste("package", pkgname, sep=":")
>     myEnv <- as.environment(match(fullName, search()))
>     dataFile <- file.path(libname, pkgname, "R", "all.rda")
>     rm(.First.lib, envir = myEnv)
>     load(dataFile, myEnv)
>
> I found that myEnv is not set. as the package can not be matched in
> search().
> If I comment the line load(dataFile, myEnv), then the package is loaded
> without errors but there no functions is loaded at all.
>
> It probably is something trivial. Can some one help, please?

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list