new.database(where=<<see below>>, type="directory", platform.=platform())
"WIN386"
when running under Unix will
create a database that can be used under both Windows and Unix.
The named directory will be created if it does not exist and the following subdirectories created within it:
__Hhelp, __Meta, __Shelp, ___nonfi, __prev, and __init.
undo
function
and store the previous and initial versions of a data set.
The __*help and __Meta directories
store help files and methods metadata, respectively.
___nonfi (Windows) and ___nonfile (Unix) are files that store mappings
between S-PLUS object names and their associated file names in .Data.
The key difference between the database created for use on a Unix platform versus Windows is the file ___nonfile (Unix) or ___nonfi (Windows). The presence of the ___nonfi file indicates that S-PLUS should respect the Windows file naming convention which results in more S-PLUS object names being mapped to file names of the form __n where n is an integer. For example, the S-PLUS object with name .FunnyName will may get stored in the file __17. The mappings between object name and file name are stored in the ___nonfi or ___nonfile file.
# To make a workspace that you can throw away at the end of # a session do work.dir <- tempfile() attach(pos=1, new.database(work.dir)) # At the end of the session copy what you like from # where=1 to where=2 then detach and remove that workspace with detach(1) rmdir(work.dir)