savehistory               package:base               R Documentation

_L_o_a_d _o_r _S_a_v_e _o_r _D_i_s_p_l_a_y _t_h_e _C_o_m_m_a_n_d_s _H_i_s_t_o_r_y

_D_e_s_c_r_i_p_t_i_o_n:

     Load or save or display the commands history.

_U_s_a_g_e:

     loadhistory(file = ".Rhistory")
     savehistory(file = ".Rhistory")
     history(max.show = 25, reverse = FALSE)

_A_r_g_u_m_e_n_t_s:

    file: The name of the file in which to save the history, or from
          which to load it. The path is relative to the current working
          directory.

max.show: The maximum number of lines to show. 'Inf' will give all of
          the currently available history.

 reverse: logical. If true, the lines are shown in reverse order. Note:
          this is not useful when there are continuation lines.

_D_e_t_a_i_l_s:

     This works under the 'readline' and GNOME interfaces, but not if
     'readline' is not available (for example, in batch use).

_N_o_t_e:

     If you want to save the history (almost) every session, you can
     put a call to 'savehistory()' in '.Last'.

_E_x_a_m_p_l_e_s:

     ## Don't run: 
     .Last <- function()
         if(interactive()) try(savehistory("~/.Rhistory"))
     ## End Don't run

