savehistory              package:utils              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:

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

