[R] Problem with workspace loading after languageR use
Pfister
pfister at uni-lueneburg.de
Fri Jun 15 17:49:49 CEST 2007
Dear Brian,
thanks a lot for your advice.
Prof Brian Ripley wrote:
> On Fri, 15 Jun 2007, Prof Brian Ripley wrote:
>
>>
>> I think adding the following to your new session before load() will help
>>
>> findPackageEnv <- function(info)
>> as.environment(paste("package", "info", sep=":"))
this does not work.
>
> more likely
>
> findPackageEnv <- function(info) as.environment(info)
this works, if I load the languageR library before.
>
> is correct.
>>
>> will work, but if not try
>>
>> findPackageEnv <- function(info) .GlobalEnv
this works unconditionally. Including that line in a local .RProfile
file, basically solves the problem.
>>
>> If you send me the problematic workspace (or reproduction
>> instructions) I can take a closer look.
A typical session would look like this (using example data from Hox(2002)):
# from Hox (2002)
hoxpop <-
read.table("http://www.ruediger-pfister.de/download/popular.dat",
header=TRUE)
hoxpop$PUPIL <- factor(hoxpop$PUPIL)
hoxpop$SCHOOL <- factor(hoxpop$SCHOOL)
hoxpop$SEX <- factor(hoxpop$SEX)
# load languageR
library(languageR)
# do some analyses ...
# save the workspace
save.image("D:\\statistics\\MultilevelAnalysis\\lm.RData")
After quitting R, the workspace "lm.RData" will not reload.
(this workspace can be downloaded here:
http://www.ruediger-pfister.de/Downloads/lmRData.zip)
best
Rüdiger
>>
>>
>> On Fri, 15 Jun 2007, Pfister wrote:
>>
>>> Hello R,
>>>
>>> To analyze multi-level data, I started learning and using lmer. So far
>>> so wonderful. I then found some useful functions in package languageR.
>>> But then the following problem ocurred: Whenever I load and use the
>>> languageR package, then save the workspace - or quit R with saving the
>>> workspace - I am unable to reload that workspace in a later session.
>>> That is, R doesn't start at all when I try to start it by clicking the
>>> workspace file.
>>> Loading languageR before loading the workspace doesn't help, but yields
>>> the message:
>>>
>>> Error in load("D:\\statistics\\MultilevelAnalysis\\.RData") :
>>> could not find function "findPackageEnv"
>>>
>>> Thus, the saved workspace remains inaccessible. I not 100% certain that
>>> languageR is the scapegoat, but my trial-and-error experiments indicate
>>> it is.
>>>
>>> My system is Win XP Home/Professional:
>>>
>>> > sessionInfo()
>>> R version 2.5.0 Patched (2007-04-24 r41305)
>>> i386-pc-mingw32
>>> locale:
>>> LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252
>>>
>>> attached base packages:
>>> [1] "splines" "stats" "graphics" "grDevices" "utils"
>>> [6] "datasets" "methods" "base"
>>> other attached packages:
>>> languageR rpart MASS Design survival
>>> "0.2" "3.1-36" "7.2-34" "2.0-12" "2.31"
>>> Hmisc e1071 class cluster zipfR
>>> "3.3-2" "1.5-16" "7.2-34" "1.11.7" "0.6-0"
>>> lme4 coda Matrix lattice
>>> "0.99875-1" "0.11-2" "0.99875-2" "0.15-8"
>>>
>>>
>>> thanks for any helpful suggestions!
>>>
>>> best
>>> Rüdiger
>>>
>>>
>>>
>>
>>
>
--
Hans-Rüdiger Pfister
Professor of Business Psychology
University of Lüneburg
Faculty for Business Administration, Behavioral Sciences and Law
Institute of Experimental Industrial Psychology (LueneLab)
Wilschenbrucher Weg 84
D-21335 Lüneburg, Germany
+49-(0)4131 677 7759
pfister at uni-lueneburg.de
More information about the R-help
mailing list