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

