nextElem              package:iterators              R Documentation

_G_e_t _N_e_x_t _E_l_e_m_e_n_t _o_f _I_t_e_r_a_t_o_r

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

     'nextElem' is a generic function used to produce values. If a
     'checkFunc' was specified to the constructor, the potential
     iterated values will be passed to the 'checkFunc' until the
     'checkFunc' returns 'TRUE'. When the iterator has no more values,
     it calls stop with the message 'StopIteration'.

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

     nextElem(obj, ...)

     ## S3 method for class 'containeriter':
     nextElem(obj, ...)
     ## S3 method for class 'funiter':
     nextElem(obj, ...)

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

     obj: an iterator object.

     ...: additional arguments that are ignored.

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

     The value.

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

       it <- iter(c('a', 'b', 'c'))
       print(nextElem(it))
       print(nextElem(it))
       print(nextElem(it))

