Save                  package:Hmisc                  R Documentation

_F_a_c_i_l_i_a_t_e _U_s_e _o_f _s_a_v_e _a_n_d _l_o_a_d _t_o _R_e_m_o_t_e _D_i_r_e_c_t_o_r_i_e_s

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

     These functions are slightly enhanced versions of 'save' and
     'load' that allow a target directory to be specified using
     'options(LoadPath="pathname")'.  If the 'LoadPath' option is not
     set, the current working directory is used.

_U_s_a_g_e:

     # options(LoadPath='mypath')
     Save(object)
     Load(object)

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

  object: the name of an object, usually a data frame.  It must not be
          quoted.

_D_e_t_a_i_l_s:

     'Save' creates a temporary version of the object under the name
     given by the user, so that 'save' will internalize this name. Then
     subsequent 'Load' or 'load' will cause an object of the original
     name to be created in the global environment.  The name of the R
     data file is assumed to be the name of the object appended with
     '".rda"'.  For 'Save', compression is used.

_A_u_t_h_o_r(_s):

     Frank Harrell

_S_e_e _A_l_s_o:

     'save', 'load'

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

     ## Not run: 
     d <- data.frame(x=1:3, y=11:13)
     options(LoadPath='../data/rda')
     Save(d)   # creates ../data/rda/d.rda
     Load(d)   # reads   ../data/rda/d.rda
     ## End(Not run)

