is.object                package:base                R Documentation

_I_s _a_n _O_b_j_e_c_t "_i_n_t_e_r_n_a_l_l_y _c_l_a_s_s_e_d"?

_D_e_s_c_r_i_p_t_i_o_n:

     A function rather for internal use.  It returns 'TRUE' if the
     object 'x' has the R internal 'OBJECT' bit set, and 'FALSE'
     otherwise.  The 'OBJECT' bit is set when a '"class"' attribute is
     added and removed when that attribute is removed, so this is a
     very efficient way to check if an object has a class attribute. 
     (S4 objects always should.)

_U_s_a_g_e:

     is.object(x)

_A_r_g_u_m_e_n_t_s:

       x: object to be tested.

_S_e_e _A_l_s_o:

     'class', and 'methods'.

     'isS4'.

_E_x_a_m_p_l_e_s:

     is.object(1) # FALSE
     is.object(as.factor(1:3)) # TRUE

