".SmodeDump" <- function(x, name)
{
assign(".SmodeTmp", options(error = dump.calls), where = 0, i = T)
on.exit( {
options(.SmodeTmp)
remove(".SmodeTmp", where = 0)
} )
dump(x, file = name)
}
".SmodeLoad" <- function(x)
{
pseudo <- function()
cat(get.message(), "Dumped\n", sep = "", file = "|stderr")
assign(".SmodeTmp", options(error = pseudo), where = 0, i = T)
on.exit( {
options(.SmodeTmp)
remove(".SmodeTmp", where = 0)
} )
invisible(source(x))
}
".SmodeObs" <- function(where, pattern)
{
if(pattern == "") objects(where) else objects(where, pattern)
}
".SmodePaths" <- function()
{
temp <- search()
value <- character(length(temp))
for(i in seq(along.with = temp)) {
obj <- database.object(i)
if(is.character(obj) && length(obj) == 1)
value[[i]] <- obj
}
value
}
"smode.lvsave" <-
c(".Last.value",
".SmodeDump", ".SmodeLoad", ".SmodeObs", ".SmodePaths",
"smode.lvsave")