checkScalarType          package:ifultools          R Documentation

_C_h_e_c_k _f_o_r _s_c_a_l_a_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 scalar value and checks the class of
     the scalar. 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:

     checkScalarType(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', 'checkVectorType', 'checkRange'.

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

     ## expect no output from the following calls 
     checkScalarType(pi,"numeric")
     checkScalarType(100,"integer")
     checkScalarType(letters[1],"character")

