is.language               package:base               R Documentation

_I_s _a_n _O_b_j_e_c_t _a _L_a_n_g_u_a_g_e _O_b_j_e_c_t?

_D_e_s_c_r_i_p_t_i_o_n:

     'is.language' returns 'TRUE' if 'x' is a variable 'name', a
     'call', or an 'expression'.

_U_s_a_g_e:

     is.language(x)

_A_r_g_u_m_e_n_t_s:

       x: object to be tested.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

_E_x_a_m_p_l_e_s:

     ll <- list(a = expression(x^2 - 2*x + 1), b = as.name("Jim"),
                c = as.expression(exp(1)), d = call("sin", pi))
     sapply(ll, typeof)
     sapply(ll, mode)
     stopifnot(sapply(ll, is.language))

