

nlevels {base}                               R Documentation

_T_h_e _N_u_m_b_e_r _o_f _L_e_v_e_l_s _o_f _a _F_a_c_t_o_r

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

     nlevels(x)

_D_e_t_a_i_l_s_:

     If the argument is not a `factor', `NA' is returned.

     The actual factor levels (if they exist) can be
     obtained with the `levels' function.

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

     nlevels(gl(3,7)) # = 3

