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

