

pruneLevels(nlme)                            R Documentation

_P_r_u_n_e _F_a_c_t_o_r _L_e_v_e_l_s

_D_e_s_c_r_i_p_t_i_o_n_:

     The `levels' attribute of `object' are pruned to con-
     tain only the levels occurring in the factor.

_U_s_a_g_e_:

     pruneLevels(object)

_A_r_g_u_m_e_n_t_s_:

  object: an object inheriting from class `factor'.

_V_a_l_u_e_:

     an object identical to `object', but with the `levels'
     attribute containing only value occurring in the fac-
     tor.

_A_u_t_h_o_r_(_s_)_:

     Jose Pinheiro and Douglas Bates

_S_e_e _A_l_s_o_:

     `factor', `ordered'

_E_x_a_m_p_l_e_s_:

     library(nlme)
     f1 <- factor(c(1,1,2,3,3,4,5))
     levels(f1)
     f2 <- f1[4:7]
     levels(f2)
     levels(pruneLevels(f2))

