partconv               package:mclust               R Documentation

_N_u_m_e_r_i_c _E_n_c_o_d_i_n_g _o_f _a _P_a_r_t_i_t_i_o_n_i_n_g

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

     Converts a vector interpreted as a classification or partitioning 
     into a numeric vector.

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

     partconv(x, consec=TRUE)

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

       x: A vector interpreted as a classification or partitioning.  

  consec: Logical value indicating whether or not to consecutive class
          numbers should be used . 

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

     Numeric encoding of 'x'.  When 'consec = TRUE', the distinct
     values in 'x' are numbered by the order in which they appear. When
     'consec = FALSE', each distinct value in 'x' is numbered by the
     index corresponding to its first appearance in 'x'.

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

     'partuniq'

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

     partconv(iris[,5])

     set.seed(0)
     cl <- sample(LETTERS[1:9], 25, replace=TRUE)
     partconv(cl, consec=FALSE)
     partconv(cl, consec=TRUE)

