dump                  package:base                  R Documentation

_T_e_x_t _R_e_p_r_e_s_e_n_t_a_t_i_o_n_s _o_f _R _O_b_j_e_c_t_s

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

     This function takes a vector of names of R objects and produces
     text representations of the objects on a file or connection.

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

     dump(list, file = "dumpdata.R", append = FALSE, envir = parent.frame())

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

    list: character. The names of one or more R objects to be dumped.

    file: either a character string naming a file or a connection. '""'
          indicates output to the console.

  append: if 'TRUE', output will be appended to 'file'; otherwise, it
          will overwrite the contents of 'file'.

   envir: the environment to search for objects.

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

     At present the implementation of 'dump' is very incomplete and it
     really only works for functions and simple vectors and lists.

     'dump' will warn if fewer characters were written to a file than
     expected, which may indicate a full or corrupt file system.

     A 'dump' file can be 'source'd into another R (or perhaps S)
     session, but the function 'save' is designed to be used for
     transporting R data, and will work with R objects that 'dump' does
     not handle.

_N_o_t_e:

     The 'envir' argument was added at version 1.7.0, and changed the
     default search path for named objects to include the environment
     from which 'dump' was called.

     As 'dump' is defined in the base namespace, the 'base' package
     will be searched _before_ the global environment unless 'dump' is
     called from the top level or the 'envir' argument is given
     explicitly.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

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

     'dput', 'dget', 'write'.
      'save' for a more reliable way to save R objects.

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

     x <- 1; y <- 1:10
     dump(ls(patt='^[xyz]'), "xyz.Rdmped")
     unlink("xyz.Rdmped")

