is.function               package:base               R Documentation

_I_s _a_n _O_b_j_e_c_t _o_f _T_y_p_e (_P_r_i_m_i_t_i_v_e) _F_u_n_c_t_i_o_n?

_D_e_s_c_r_i_p_t_i_o_n:

     Checks whether its argument is a (primitive) function.

_U_s_a_g_e:

     is.function(x)
     is.primitive(x)

_A_r_g_u_m_e_n_t_s:

       x: an R object.

_D_e_t_a_i_l_s:

     'is.primitive(x)' tests if 'x' is a primitive function (either a
     '"builtin"' or '"special"' as described for 'typeof')?

_V_a_l_u_e:

     'TRUE' if 'x' is a (primitive) function, and 'FALSE' otherwise.

_E_x_a_m_p_l_e_s:

     is.function(1) # FALSE
     is.function(is.primitive)  # TRUE: it is a function, but ..
     is.primitive(is.primitive) # FALSE:it's not a primitive one, whereas
     is.primitive(is.function)  # TRUE: that one *is*

