nwsStoreFile               package:nws               R Documentation

_R_e_a_d _a _V_a_l_u_e _f_r_o_m _F_i_l_e _a_n_d _S_t_o_r_e _i_n _n_e_t_W_o_r_k_S_p_a_c_e

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

     Store a new value into a variable in the workspace from a file.

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

     ## S4 method for signature 'netWorkSpace':
     nwsStoreFile(.Object, xName, fObj, n=0)

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

 .Object: a netWorkSpace class object.

   xName: character string specifying the name of the variable to be
          stored

    fObj: a 'file' object or character string specifying file from
          which to read data to store in the variable.

       n: Number of bytes to write.  A value of zero means to write all
          the data in the file.

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

     The 'nwsStoreFile' method works like 'nwsStore', except that the
     value to store in the netWorkSpace variable comes from a file. If
     'fObj' is a character string, 'nwsStoreFile' calls 'file' to
     obtain a file connection which is opened for the duration of the
     method.

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

     'nwsStore'

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

     ## Not run: 
     ws <- netWorkSpace('nws example')
     nwsStore(ws, 'x', 'Hello, world\n')
     nwsFindFile(ws, 'x', 'hello.txt')
     nwsStoreFile(ws, 'hello', 'hello.txt')
     ## End(Not run)

