partconv               package:mclust               R Documentation

_C_o_n_v_e_r_t _p_a_r_t_i_t_i_o_n_i_n_g _i_n_t_o _n_u_m_e_r_i_c_a_l _v_e_c_t_o_r.

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

     'partconv' converts a partitioning into a numerical vector. The
     second argument is used to force consecutive numbers (default) or
     not.

_U_s_a_g_e:

     partconv(x, consec=TRUE)

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

       x: Partitioning. Maybe numerical or not.

  consec: Logical flag, whether or not to use consecutive class
          numbers.

_V_a_l_u_e:

     Vector of class numbers.

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

     data(iris)
     partconv(iris[,5])

     cl <- sample(1:10, 25, replace=TRUE)
     partconv(cl, consec=FALSE)
     partconv(cl, consec=TRUE)

