#-*- S -*-  

#  Complements to Appendix C


"wbigfile"<-
function(where = 1, o = objects(), directory = ".", 
        bigfile = paste(directory, "__BIG", sep = "/"),
        bigfile.index = paste(directory, "__BIGIN", sep = "/"))
{
  data <- vector(mode = "list", length = length(o))
  for(i in seq(along = o))
    data[[i]] <- get(o[[i]], where = where, immediate = T)
  names(data) <- o
  .Internal(put.to.bigfile(data, bigfile, bigfile.index,
    "standard"), "S_put_to_big_file", T, 0)
}

tobig.bat:

rem > null.q
start /w /min splus.exe BATCH convert.q
move _Data _Data.old
mkdir _Data
move __BIG _Data
move __BIGIN _Data
rem > _Data\__db3.1
move _Data.old\_Help _Data
start /w /min splus.exe BATCH null.q
del null.q

convert.q:

library(wbigfile)
if(exists("last.dump")) rm(last.dump)
if(exists(".Last.value")) rm(.Last.value)
wbigfile()


# End of appC
