

_T_e_r_m_i_n_a_t_e _a_n _R _S_e_s_s_i_o_n

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

_A_r_g_u_m_e_n_t_s:

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

_D_e_s_c_r_i_p_t_i_o_n:

     The function `quit' or its alias `q' terminate the
     current 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_e_e _A_l_s_o:

     `.First' for setting things on startup.

_E_x_a_m_p_l_e_s:

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

