## S3 method for class 'default':
onSessionExit(fcn, action=c("prepend", "append", "replace"), ...)
function
to be called without argument.character
string specifying how the hook function is
added to list of hooks.finalizeSession
() is
called. Moreover, when this package is loaded, the .Last()
function is modified such that finalizeSession()
is called.
However, note that .Last()
is not guaranteed to be called
when the Rsession finished. For instance, the user may quit Rby
calling quit(callLast=FALSE)
.
Moreover, when Ris run in batch mode, .Last()
is never called..Last()
.
finalizeSession
().onSessionExit(function(...) {
cat("Bye bye world!\n");
})
quit()
Run the code above in your browser using DataLab