ultrametric               package:clue               R Documentation

_U_l_t_r_a_m_e_t_r_i_c_s _o_f _H_i_e_r_a_r_c_h_i_e_s

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

     Compute the ultrametric distances for objects representing (total
     indexed) hierarchies.

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

     cl_ultrametric(x, size = NULL, labels = NULL)
     as.cl_ultrametric(x)

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

       x: an R object representing a hierarchy of objects.

    size: an integer giving the number of objects in the hierarchy.

  labels: a character vector giving the names of the objects in the
          hierarchy.

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

     If 'x' is not an ultrametric, 'cl_ultrametric(x)' uses
     'cophenetic' to obtain the ultrametric (also known as cophenetic)
     distances from the hierarchy, which in turn by default calls the
     S3 generic 'as.hclust' on the hierarchy. Support for classes which
     represent hierarchies can thus be added by providing 'as.hclust'
     methods for this class.  In R 2.1.0 or better, 'cophenetic' is an
     S3 generic as well, and one can also more directly provide methods
     for this if necessary.

     'as.cl_ultrametric' is a generic function which can be used for
     coercing _raw_ (non-classed) ultrametrics, represented as numeric
     vectors (of the lower-half entries) or numeric matrices, to
     ultrametric objects.

     Ultrametric objects are implemented as symmetric proximity objects
     with a dissimilarity interpretation so that self-proximities are
     zero, and inherit from classes '"cl_dissimilarity"' and
     '"cl_proximity"'.  See section *Details* in the documentation for
     'cl_dissimilarity' for implications.

     Ultrametric objects can also be coerced to classes '"dendrogram"'
     and '"hclust"', and hence in particular use the 'plot' methods for
     these classes.  By default, plotting an ultrametric object uses
     the plot method for dendrograms.

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

     An object of class '"cl_ultrametric"' containing the ultrametric
     distances.

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

     'is.cl_hierarchy'

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

     hc <- hclust(dist(USArrests))
     u <- cl_ultrametric(hc)
     ## Subscripting.
     u[1 : 5, 1 : 5]
     u[1 : 5, 6 : 7]
     ## Plotting.
     plot(u)

