names                  package:base                  R Documentation

_T_h_e _N_a_m_e_s _A_t_t_r_i_b_u_t_e _o_f _a_n _O_b_j_e_c_t

_D_e_s_c_r_i_p_t_i_o_n:

     `names' is a generic accessor function to the `names' attribute of
     an R object, typically a `vector'. The first form prints the names
     of the observations and the second sets the names. In this case,
     `value' must be a vector of character strings of the same length
     as `x'.

_U_s_a_g_e:

     names(x, ...)
     names.default(x)
     names(x) <- value

_E_x_a_m_p_l_e_s:

     # print the names attribute of the islands data set
     names(islands)

     # remove the names attribute
     names(islands) <- NULL

