EVOLUTION-MANAGER
Edit File: order.dendrogram.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Ordering or Labels of the Leaves in a Dendrogram</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for order.dendrogram {stats}"><tr><td>order.dendrogram {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Ordering or Labels of the Leaves in a Dendrogram</h2> <h3>Description</h3> <p>Theses functions return the order (index) or the <code>"label"</code> attribute for the leaves in a dendrogram. These indices can then be used to access the appropriate components of any additional data. </p> <h3>Usage</h3> <pre> order.dendrogram(x) ## S3 method for class 'dendrogram' labels(object, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x, object</code></td> <td> <p>a dendrogram (see <code><a href="dendrogram.html">as.dendrogram</a></code>).</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>additional arguments</p> </td></tr> </table> <h3>Details</h3> <p>The indices or labels for the leaves in left to right order are retrieved. </p> <h3>Value</h3> <p>A vector with length equal to the number of leaves in the dendrogram is returned. From <code>r <- order.dendrogram()</code>, each element is the index into the original data (from which the dendrogram was computed). </p> <h3>Author(s)</h3> <p>R. Gentleman (<code>order.dendrogram</code>) and Martin Maechler (<code>labels.dendrogram</code>).</p> <h3>See Also</h3> <p><code><a href="reorder.factor.html">reorder</a></code>, <code><a href="dendrogram.html">dendrogram</a></code>. </p> <h3>Examples</h3> <pre> set.seed(123) x <- rnorm(10) hc <- hclust(dist(x)) hc$order dd <- as.dendrogram(hc) order.dendrogram(dd) ## the same : stopifnot(hc$order == order.dendrogram(dd)) d2 <- as.dendrogram(hclust(dist(USArrests))) labels(d2) ## in this case the same as stopifnot(identical(labels(d2), rownames(USArrests)[order.dendrogram(d2)])) </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>