

   TTeerrmmiinnaattee aann RR SSeessssiioonn

        quit(save="ask")
           q(save="ask")
        .Last <- function(x) { ...... }

   AArrgguummeennttss::

       save: a character string indicating whether the environ-
             ment (workspace) should be saved.

   DDeessccrriippttiioonn::

        The function `quit' or its alias `q' terminate the cur-
        rent R session.  `save' must be one of `"no"', `"yes"',
        or `"ask"'.  In the first case the workspace is not
        saved, in the second it is saved and in the third the
        user is prompted and can also decide not to quit.

        Immediately before terminating, the function `.Last()'
        is executed if it exists.

   SSeeee AAllssoo::

        `.First' for setting things on startup.

   EExxaammpplleess::

        .Last <- function() {
          cat("Now printing  PostScript graphic:\n")
          system("lpr Rplots.ps")
          cat("bye bye...\n")
        }
        ## Not really:  quit("yes")

