conversion             package:flexclust             R Documentation

_C_o_n_v_e_r_t _S_3 _P_a_r_t_i_t_i_o_n _O_b_j_e_c_t_s _t_o _K_C_C_A

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

     These functions can be used to convert the results from cluster
     functions like 'kmeans' or 'pam' to objects of class '"kcca"'.

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

     as.kcca(object, ...)

     ## S3 method for class 'kmeans':
     as.kcca(object, data, ...)
     ## S3 method for class 'partition':
     as.kcca(object, data=NULL, ...)

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

  object: fitted object.

    data: data which were used to obtain the clustering. For
          '"partition"' objects created by functions from package
          cluster this is optional, if 'object' contains the data.

     ...: currently not used.

_A_u_t_h_o_r(_s):

     Friedrich Leisch

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

     data(Nclus)

     cl1 = kmeans(Nclus, 4)
     cl1
     cl1a = as.kcca(cl1, Nclus)
     cl1a



     library("cluster")
     cl2 = pam(Nclus, 4)
     cl2
     cl2a = as.kcca(cl2)
     cl2a
     ## the same
     cl2b = as.kcca(cl2, Nclus)
     cl2b

