[R] Saving environment object

Benjamin Otto b.otto at uke.uni-hamburg.de
Fri Aug 15 15:43:28 CEST 2008


Hi Erik,

Yes this is what I was trying and your example or the one of luke is working
fine with me.

So now I'm not sure if this is due to an environment which takes too much
space. The environment troubling me has 644276 entries. Is this too much?

Benjamin

-----Ursprüngliche Nachricht-----
Von: Erik Iverson [mailto:iverson at biostat.wisc.edu] 
Gesendet: Friday, August 15, 2008 3:37 PM
An: Benjamin Otto
Cc: R-Help
Betreff: Re: [R] Saving environment object

Benjamin Otto wrote:
> Hi,
> 
> When I create an environment object with new.env() and populate it with
> values then how can I save it into an .RData file properly, so it can be
> loaded later on in a new session?
> 
> Saving an environment object with save() or save.image() results in an
error
> message when loading again:
> 
> Error: protect(): protection stack overflow

Can you give a small, reproducible example as the posting guide asks? 
And also provide your sessionInfo() ?

I am not able to replicate this.

test <- new.env()
assign("hi", pi, pos = test)
save(test, file = "~/testenv.Rdata")

does not give me an error.  Is this basically what you're trying?




-- 
Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG):

Universitätsklinikum Hamburg-Eppendorf
Körperschaft des öffentlichen Rechts
Gerichtsstand: Hamburg

Vorstandsmitglieder:
Prof. Dr. Jörg F. Debatin (Vorsitzender)
Dr. Alexander Kirstein
Ricarda Klein
Prof. Dr. Dr. Uwe Koch-Gromus


More information about the R-help mailing list