save.session {session} | R Documentation |
Save and restore session information, including loaded packages and attached data objects.
save.session(file=".RSession", ...) restore.session(file=".RSession", ...)
file |
Filename for the session information. |
... |
Optional arguments for save() or load() . |
These two functions save and restore R session information. In addition to the objects in the session, the list of currently loaded packages and the search path are (re)stored.
Open graphics devices, sinks
s, pipes, etc. will not be stored.
save.session
issues a warning to this effect if any graphics
devices are open.
No return value.
Future enhancements may allow the restoration of the size, location, and graphics settings of graphics devices.
Gregory R. Warnes warnes@bst.rochester.edu
ls(all=TRUE) # show all data objects search() # list search path # save the current R session to the file "RSession.Rda" save.session("RSession.Rda") ## Not run: # exit R without saving data q("no") # restart R R ## End(Not run) # load a saved R session from "RSession.Rda" restore.session("RSession.Rda") ls(all=TRUE) # show all data objects search() # list search path