Skip to contents

A modified version of q/quit that allows to save the list of attached packages. See quit for the function details.

Usage

q(save = "yes", savePackageList = TRUE, status = 0, runLast = TRUE)

quit(save = "yes", savePackageList = TRUE, status = 0, runLast = TRUE)

Arguments

save

A character string indicating whether the environment (workspace) should be saved, one of "no" or "yes" (which is the default).

savePackageList

Logical, whether to save the list of loaded packages (defaults to TRUE). Switched to FALSE if save = "no".

status

The (numerical) error status to be returned to the operating system, where relevant. Conventionally ‘0’ indicates successful completion.

runLast

Should ‘.Last()’ be executed?

Details

If savePackageList, the list of attached packages is automatically saved in a file .Rpackages. See savepkglist for more details.

Author

Mathieu Basille <\email{mathieu@basille.org}>

Examples

if (FALSE) { # \dontrun{
## Quit with package list saved:
q()} # }