ireadLines             package:iterators             R Documentation

_I_t_e_r_a_t_o_r _o_v_e_r _L_i_n_e_s _o_f _T_e_x_t _f_r_o_m _a _C_o_n_n_e_c_t_i_o_n

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

     Returns an iterator over the lines of text from a connection. It
     is a wrapper around the standard 'readLines' function.

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

     ireadLines(con, n=1, ...)

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

     con: a connection object or a character string.

       n: integer.  The maximum number of lines to read. Negative
          values indicate that one should read up to the end of the
          connection.  The default value is 1.

     ...: passed on to the 'readLines' function.

_V_a_l_u_e:

     The line reading iterator.

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

     'readLines'

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

       # create an iterator over the lines of COPYING
       it <- ireadLines(file.path(R.home(), 'COPYING'))
       nextElem(it)
       nextElem(it)
       nextElem(it)

