Rev Language Reference


clear - Clear the current workspace

Clear (e.g., remove) variables and functions from the workspace.

Usage

clear(RevObject ...)

Arguments

... : RevObject (pass by const reference)
Variables to remove.

Return Type

Details

The clear function removes either a given variable or all variables from the workspace. Clearing the workspace is very useful between analysis if you do not want to have old connections between variables hanging around.

Example

ls()   # check what is in the workspace
a <- 1
b := exp(a)
ls()   # check what is in the workspace
clear()
ls()   # check what is in the workspace
a <- 1
b := exp(a)
ls()   # check what is in the workspace
clear( b )
ls()   # check what is in the workspace

See Also