ScalarObject-class          package:Biobase          R Documentation

_U_t_i_l_i_t_y _c_l_a_s_s_e_s _f_o_r _l_e_n_g_t_h _o_n_e (_s_c_a_l_a_r) _o_b_j_e_c_t_s

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

     These classes represent scalar quantities, such as a string or a
     number and are useful because they provide their own validity
     checking.  The classes 'ScalarCharacter', 'ScalarInteger', and
     'ScalarNumeric' all extend their respective base vector types and
     can be used interchangeably (except they should always have length
     one).

     The 'mkScalar' factory function provides a convenient way of
     creating 'Scalar<type>' objects (see the examples section below).

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

     mkScalar(obj)

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

     obj: An object of type 'character', 'integer', or 'double'

_A_u_t_h_o_r(_s):

     Seth Falcon

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

     v <- list(mkScalar("a single string"),
               mkScalar(1),
               mkScalar(1L))
     sapply(v, class)
     sapply(v, length)

