[R] Error in load(dataFile, myEnv)
Zhesi He
zh107 at york.ac.uk
Wed Feb 2 01:00:04 CET 2005
Dear Prof Ripley,
Thanks for your reply.
I couldn't find anything wrong with Load() function.
It seems that myEnv is not set, as myEnv <- as.environment(match(fullName,
search())) does not return a valid value.
Also, when I commented the load(dataFile, myEnv) line, the rest of
.First.lib code does not work (no function is loaded, e.g. when I input the
function in the package, it doesn't recognise it)
Any suggestions?
Zhesi.
----- Original Message -----
From: "Prof Brian Ripley" <ripley at stats.ox.ac.uk>
To: "Zhesi He" <zh107 at york.ac.uk>
Cc: <R-help at stat.math.ethz.ch>
Sent: Tuesday, February 01, 2005 3:39 PM
Subject: Re: [R] Error in load(dataFile, myEnv)
> 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