clearws {rwm} | R Documentation |
Removes all functions and datasets.
Also removes .WSID
but not .UserDirectory
, .UserDate
and
other hidden variables.
The working directory is reset to .UserDirectory
.
clearws(silentQ=FALSE)
silentQ |
FALSE, display message; TRUE, no message |
Using this function is similar to quitting R and starting
R again with a fresh workspace except that the
R command history is kept.
All non-hidden R objects are deleted as well
as the hidden variables .WSID
, .LastSaved
and .Describe
if they exist in the current workspace.
None
A.I. McLeod
#INITIALIZATION #Normally .UserDirectory and .UserDate are defined previously. #Usually a more convenient directory is used but for illustration #using a script which will run in interactive or batch mode on any computer: .UserDirectory <- tempdir() .UserDate <- "2008" dir.create(paste(.UserDirectory, .UserDate, sep="/")) #Fit model to airquality data, save and clear NYO3.fit <- lm(Ozone~Solar.R + Wind + Temp, data=airquality) NYO3.fit savews("NYO3") clearws() ls(all.names=TRUE)