Save                package:mvbutils                R Documentation

_S_a_v_e _R _o_b_j_e_c_t_s

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

     These function resemble 'save' and 'save.image', with two main
     differences. First, any functions which have been 'mtrace'd (see
     the 'debug' package) will be temporarily untraced during saving
     (though the 'debug' package is not needed to run them). Second,
     'Save' and 'Save.pos' know how to deal with lazy-loaded objects
     set up via 'mlazy'. 'Save()' is like 'save.image()' 'Save.pos(i)'
     saves all objects from the 'i'th position on the search list in
     the corresponding ".Rdata" file (or "all.rda" file for
     image-loading packages, or "*.rdb/*.rdx" for lazyloading
     packages). There is less flexibility in the arguments than for the
     system equivalents.

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

     Save()
     Save.pos( pos, path, ascii=FALSE)

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

     pos: character or numeric position on search path

    path: directory or file to save into (see DETAILS).

   ascii: file type, as per 'save'

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

     If a function 'f' is saved while 'mtrace'd and then restored into
     a different R session, there will be an error message when you try
     to run 'f'. Assuming that the 'debug' package is loaded, this can
     be fixed by 'mtrace(f,FALSE)' or 'mtrace(f)' if you really want to
     debug 'f'. However, you can avoid the problem in the first place
     by always calling 'Save' and 'Save.pos'; this is faster than
     manually untracing and retracing, and avoids losing any
     breakpoints. If you use the 'cd' system in 'mvbutils', you will
     rarely need to call 'Save.pos' directly; 'cd', 'move' and 'FF'
     will do it for you.

     To exclude objects from saving, store their names in 'options(
     dont.save)'. The default exclusion if the option is not set, is
     'c( ".packageName", ".SavedPlots", "last.warning", ".Traceback")';
     good additions might be 'last.warning' and '.Last.value'.

     'path' is normally inferred from the 'path' attribute of the 'pos'
     workspace. If no such attribute can be found (e.g. if the attached
     workspace was a list object), you will be prompted. If 'path' is a
     directory, the file will be called ".Rdata" if that file already
     exists, or 'R/all.rda' if that exists, or 'R/*.rbd' for lazy loads
     if that exists; and if none of these exist already, then the file
     will be called '.Rdata' after all. If you specify 'path', it must
     be a complete directory path or file path (i.e. it will not be
     interpreted relative to a 'path' attribute).

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

     Mark Bravington

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

     'save', 'save.image', mtrace in package 'debug', 'mlazy'

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

     ## Not run: 
     Save() #
     Save.pos( "package:mvbutils") # binary image of exported functions
     Save.pos( 3, path="temp.Rdata") # path appended to attr( search()[3], "path")
     ## End(Not run)

