name                  package:base                  R Documentation

_V_a_r_i_a_b_l_e _N_a_m_e_s _o_r _S_y_m_b_o_l_s, _r_e_s_p_e_c_t_i_v_e_l_y

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

     'as.symbol' coerces its argument to be a _symbol_, or
     equivalently, a _name_.  The argument must be of mode
     '"character"'.  'as.name' is an alias for 'as.symbol'.

     'is.symbol' (and 'is.name' equivalently) returns 'TRUE' or 'FALSE'
     depending on whether its argument is a symbol (i.e., name) or not.

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

     as.symbol(x)
     is.symbol(y)

     as.name(x)
     is.name(y)

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

    x, y: objects to be coerced or tested.

_D_e_t_a_i_l_s:

     'is.symbol' is generic: you can write methods to handle specific
     classes of objects, see InternalMethods.

_N_o_t_e:

     The term "symbol" is from the LISP background of R, whereas "name"
     has been the standard S term for this.

_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.

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

     'call', 'is.language'. For the internal object mode, 'typeof'.

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

     an <- as.name("arrg")
     is.name(an) # TRUE
     mode(an)   # name
     typeof(an) # symbol

