dput                  package:base                  R Documentation

_W_r_i_t_e _a_n _I_n_t_e_r_n_a_l _O_b_j_e_c_t _t_o _a _F_i_l_e

_D_e_s_c_r_i_p_t_i_o_n:

     Writes an ASCII text representation of an R object to a file or
     connection, or uses one to recreate the object.

_U_s_a_g_e:

     dput(x, file = "")
     dget(file)

_A_r_g_u_m_e_n_t_s:

       x: an object.

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

_D_e_t_a_i_l_s:

     'dput' opens 'file' and deparses the object 'x' into that file. 
     The object name is not written (contrary to 'dump'). If 'x' is a
     function the associated environment is stripped. Hence scoping
     information can be lost.

     Using 'dget', the object can be recreated (with the limitations
     mentioned above).

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

_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:

     'deparse', 'dump', 'write'.

_E_x_a_m_p_l_e_s:

     ## Write an ASCII version of mean to the file "foo"
     dput(mean, "foo")
     ## And read it back into 'bar'
     bar <- dget("foo")
     unlink("foo")

