

levels {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 lev-
     els 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'.

