levels                 package:base                 R Documentation

_L_e_v_e_l_s _A_t_t_r_i_b_u_t_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     `levels' provides access to the levels attribute of a variable.
     The first form returns the value of the levels of its argument and
     the second sets the attribute.

     The assignment form (`"levels<-"') of `levels' is a generic
     function and new methods can be written for it. The most important
     method is that for `factor's:

_U_s_a_g_e:

     levels(x)
     levels(x) <- value

_S_e_e _A_l_s_o:

     `levels<-.factor', `nlevels'.

