Primitive                package:base                R Documentation

_C_a_l_l _a ``_P_r_i_m_i_t_i_v_e'' _I_n_t_e_r_n_a_l _F_u_n_c_t_i_o_n

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

     `.Primitive' returns an entry point to a ``primitive'' (internally
     implemented) function.

     The advantage of `.Primitive' over `.Internal' functions is the
     potential efficiency of argument passing.

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

     .Primitive(name)

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

    name: name of the R function.

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

     `.Internal'.

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

     mysqrt <- .Primitive("sqrt")
     c
     .Internal # this one *must* be primitive!
     get("if") # just `if' or `print(if)' are not syntactically ok.

