serialize             package:serialize             R Documentation

_S_i_m_p_l_e _S_e_r_i_a_l_i_z_a_t_i_o_n _I_n_t_e_r_f_a_c_e

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

     A simple interface for serializing to connections.

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

     serialize(object, connection, ascii = FALSE, refhook = NULL)
     unserialize(connection, refhook = NULL)

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

  object: object to serialize.

connection: an open connection.

   ascii: logical; specifies whether to use ascii or binary format

 refhook: hook function for handling reference objects

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

     The function 'serialize' writes 'object' to the specified
     connection.  Sharing of reference objects is preserved within the
     object but not across separate calls to serialize.  If
     'connection' is 'NULL' then 'object' is serialized to a string,
     which is returned as the result of 'serialize'. For a text mode
     connection, the default value of code{ascii} is set to 'TRUE'

     'unserialize' reads an object from 'connection'. 'connection' may
     also be a string.

     The 'refhook' functions can be used to customize handling of
     non-system reference objects (all external pointers and weak
     references, and all environments other than name space and package
     environments and '.GlobalEnv').  The hook function for 'serialize'
     should return a character vector for references it wants to
     handle; otherwise it should return NULL.  The hook for
     'unserialize' will be called with character vectors supplied to
     'serialize' and should return an appropriate object.

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

     Luke Tierney

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

     x<-serialize(list(1,2,3),NULL)
     unserialize(x)

