Skip to content
Back to formatted view

Raw Message

Message-ID: <1322157155.88168.YahooMailNeo@web28208.mail.ukl.yahoo.com>
Date: 2011-11-24T17:52:35Z
From: Jannis
Subject: content of global environment with dump.frames()

Dear R users,


I am using dump.frames() to investigate the content of the different environments in cases of errors or during certain steps of a non interactive calculation. I am, however, wondering about how to see the content of the global environment at the moment that dump.fames() was invoked. Her is some test piece (careful about the rm(list=ls(), remove the # if you know what you are doing to easier see the effect):

# rm(list=ls())
a=2
test = function() {
? b=3
? dump.frames(dumpto='test', to.file = TRUE )
}
test()
# rm(list=ls())
load('test.rda')
debugger(test)

I can now investigate the value of 'b' but could not figure out a way to get the value of 'a'. Am I missing something or is dump.frames only intended to be uses with 


options(error=dump.frames) 


? Most probably some modification of save() would be more apropriate to use in my case but I could not (yet) figure out how to mimic the convenient behaviour of dump.frames() to save the whole call stack.




Thanks for any advice
Jannis