is.recursive              package:base              R Documentation

_I_s _a_n _O_b_j_e_c_t _A_t_o_m_i_c _o_r _R_e_c_u_r_s_i_v_e?

_D_e_s_c_r_i_p_t_i_o_n:

     `is.atomic' returns `TRUE' if `x' does not have a list structure
     and `FALSE' otherwise.

     `is.recursive' returns `TRUE' if `x' has a recursive (list-like)
     structure and `FALSE' otherwise.

_U_s_a_g_e:

     is.atomic(x)
     is.recursive(x)

_S_e_e _A_l_s_o:

     `is.list', `is.language', etc, and the `demo("is.things")'.

_E_x_a_m_p_l_e_s:

     is.a.r <- function(x) c(is.atomic(x), is.recursive(x))

     is.a.r(c(a=1,b=3))# TRUE FALSE
     is.a.r(list())    # FALSE TRUE ??
     is.a.r(list(2))   # FALSE TRUE
     is.a.r(lm)        #   "
     is.a.r(y ~ x)     #   "
     is.a.r(expression(x+1))# should be F-T (not in 0.62.3!)

