redClose: function to close a REDUCE session and optionally save the...

View source: R/redcas.R

redCloseR Documentation

function to close a REDUCE session and optionally save the log file

Description

redClose closes the connection to the REDUCE session thereby ending the session. If requested the log file is copied from the temporary location to one specified by the log argument.

Usage

redClose(id, log)

Arguments

id

the session identifier returned by redStart. Required with no default

log

the path to the location in which to save the session's log file. Optional.

Details

The session log returned by redClose includes the submit block markers set by redExec.

In addition to closing the connection, redClose removes the session's entry from the session registry.

Value

redClose returns TRUE if the session is closed, FALSE if it does not exist.

Author(s)

martin gregory

See Also

redStart for creating a REDUCE session and showSessions to display the session registry.

Examples

## Open a CSL session:
s1 <- redStart()
## can only run code if session was successfully started
if (is.numeric(s1)) {
   ## show session details:
   print(showSessions())
   ## close session:
   redClose(s1)
}

redcas documentation built on April 12, 2025, 1:40 a.m.