checkVectorType          package:ifultools          R Documentation

_C_h_e_c_k _f_o_r _v_e_c_t_o_r _t_y_p_e _a_n_d _c_l_a_s_s

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

     Tests the input for being a vector (as defined by the
     'isVectorAtomic' function and checks the class of the vector. This
     function is meant to be used internally for function input
     argument verification and typically will not be used otherwise.

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

     checkVectorType(x, isType="numeric")

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

       x: an S-PLUS object.

  isType: a character string defining the class of the object to be
          checked ala 'is(x,isType)'. Default: '"numeric"'.

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

     no output is returned. If these tests fail, a 'stop' condition is
     executed.

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

     'isVectorAtomic', 'checkScalarType', 'checkRange'.

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

     ## expect no output from the following calls 
     checkVectorType(rnorm(1024),"numeric")
     checkVectorType(1:3,"integer")
     checkVectorType(letters,"character")

