cws {rwm}R Documentation

Save workspace. Clear and/or quit.

Description

Similar to APL )CONTINUE, this function can be used to save the workspace and quit R. Or optionally, cws(q=FALSE), the workspace is saved, cleared and return to the initial workspace.

Usage

cws(silentQ = TRUE, q = TRUE)

Arguments

silentQ No message produced by savews.
q If TRUE, quit R. Otherwise clearws.

Value

No value

Author(s)

A.I. McLeod

See Also

savews, clearws

Examples

#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 <- "2009"
dir.create(paste(.UserDirectory, .UserDate, sep="/"))

#Simple Example
p<-3
n<-50
e<-rnorm(n)
X<-matrix(rnorm(p*n), ncol=p)
savews("MyWs")
cws(q=FALSE)

[Package rwm version 1.35 Index]