155 lines
402 KiB
HTML
155 lines
402 KiB
HTML
|
<!DOCTYPE html>
|
|||
|
|
|||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|||
|
|
|||
|
<head>
|
|||
|
|
|||
|
<meta charset="utf-8" />
|
|||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|||
|
<meta name="generator" content="pandoc" />
|
|||
|
|
|||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|||
|
|
|||
|
<meta name="author" content="Catherine Hurley" />
|
|||
|
|
|||
|
<meta name="date" content="2019-01-07" />
|
|||
|
|
|||
|
<title>Clustering Graphics</title>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<style type="text/css">code{white-space: pre;}</style>
|
|||
|
<style type="text/css">
|
|||
|
div.sourceCode { overflow-x: auto; }
|
|||
|
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
|
|||
|
margin: 0; padding: 0; vertical-align: baseline; border: none; }
|
|||
|
table.sourceCode { width: 100%; line-height: 100%; }
|
|||
|
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
|
|||
|
td.sourceCode { padding-left: 5px; }
|
|||
|
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
|
|||
|
code > span.dt { color: #902000; } /* DataType */
|
|||
|
code > span.dv { color: #40a070; } /* DecVal */
|
|||
|
code > span.bn { color: #40a070; } /* BaseN */
|
|||
|
code > span.fl { color: #40a070; } /* Float */
|
|||
|
code > span.ch { color: #4070a0; } /* Char */
|
|||
|
code > span.st { color: #4070a0; } /* String */
|
|||
|
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
|
|||
|
code > span.ot { color: #007020; } /* Other */
|
|||
|
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
|
|||
|
code > span.fu { color: #06287e; } /* Function */
|
|||
|
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
|
|||
|
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
|
|||
|
code > span.cn { color: #880000; } /* Constant */
|
|||
|
code > span.sc { color: #4070a0; } /* SpecialChar */
|
|||
|
code > span.vs { color: #4070a0; } /* VerbatimString */
|
|||
|
code > span.ss { color: #bb6688; } /* SpecialString */
|
|||
|
code > span.im { } /* Import */
|
|||
|
code > span.va { color: #19177c; } /* Variable */
|
|||
|
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
|
|||
|
code > span.op { color: #666666; } /* Operator */
|
|||
|
code > span.bu { } /* BuiltIn */
|
|||
|
code > span.ex { } /* Extension */
|
|||
|
code > span.pp { color: #bc7a00; } /* Preprocessor */
|
|||
|
code > span.at { color: #7d9029; } /* Attribute */
|
|||
|
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
|
|||
|
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
|
|||
|
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
|
|||
|
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
|
|||
|
</style>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<link href="data:text/css;charset=utf-8,body%20%7B%0Abackground%2Dcolor%3A%20%23fff%3B%0Amargin%3A%201em%20auto%3B%0Amax%2Dwidth%3A%20700px%3B%0Aoverflow%3A%20visible%3B%0Apadding%2Dleft%3A%202em%3B%0Apadding%2Dright%3A%202em%3B%0Afont%2Dfamily%3A%20%22Open%20Sans%22%2C%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20Arial%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014px%3B%0Aline%2Dheight%3A%201%2E35%3B%0A%7D%0A%23header%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0A%23TOC%20%7B%0Aclear%3A%20both%3B%0Amargin%3A%200%200%2010px%2010px%3B%0Apadding%3A%204px%3B%0Awidth%3A%20400px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Aborder%2Dradius%3A%205px%3B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%201%2E3%3B%0A%7D%0A%23TOC%20%2Etoctitle%20%7B%0Afont%2Dweight%3A%20bold%3B%0Afont%2Dsize%3A%2015px%3B%0Amargin%2Dleft%3A%205px%3B%0A%7D%0A%23TOC%20ul%20%7B%0Apadding%2Dleft%3A%2040px%3B%0Amargin%2Dleft%3A%20%2D1%2E5em%3B%0Amargin%2Dtop%3A%205px%3B%0Amargin%2Dbottom%3A%205px%3B%0A%7D%0A%23TOC%20ul%20ul%20%7B%0Amargin%2Dleft%3A%20%2D2em%3B%0A%7D%0A%23TOC%20li%20%7B%0Aline%2Dheight%3A%2016px%3B%0A%7D%0Atable%20%7B%0Amargin%3A%201em%20auto%3B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dcolor%3A%20%23DDDDDD%3B%0Aborder%2Dstyle%3A%20outset%3B%0Aborder%2Dcollapse%3A%20collapse%3B%0A%7D%0Atable%20th%20%7B%0Aborder%2Dwidth%3A%202px%3B%0Apadding%3A%205px%3B%0Aborder%2Dstyle%3A%20inset%3B%0A%7D%0Atable%20td%20%7B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dstyle%3A%20inset%3B%0Aline%2Dheight%3A%2018px%3B%0Apadding%3A%205px%205px%3B%0A%7D%0Atable%2C%20table%20th%2C%20table%20td%20%7B%0Aborder%2Dleft%2Dstyle%3A%20none%3B%0Aborder%2Dright%2Dstyle%3A%20none%3B%0A%7D%0Atable%20thead%2C%20table%20tr%2Eeven%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Ap%20%7B%0Amargin%3A%200%2E5em%200%3B%0A%7D%0Ablockquote%20%7B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Apadding%3A%200%2E25em%200%2E75em%3B%0A%7D%0Ahr%20%7B%0Aborder%2Dstyle%3A%20solid%3B%0Aborder%3A%20none%3B%0Aborder%2Dtop%3A%201px%20solid%20%23777%3B%0Amargin%3A%2028px%200%3B%0A%7D%0Adl%20%7B%0Amargin%2Dleft%3A%200%3B%0A%7D%0Adl%20dd%20%7B%0Amargin%2Dbottom%3A%2013px%3B%0Amargin%2Dleft%3A%2013px%3B%0A%7D%0Adl%20dt%20%7B%0Afont%2Dweight%3A%20bold%3B%0A%7D%0Aul%20%7B%0Amargin%2Dtop%3A%200%3B%0A%7D%0Aul%20li%20%7B%0Alist%2Dstyle%3A%20circle%20outside%3B%0A%7D%0Aul%20ul%20%7B%0Amargin%2Dbottom%3A%200%3B%0A%7D%0Apre%2C%20code%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0Aborder%2Dradius%3A%203px%3B%0Acolor%3A%20%23333%3B%0Awhite%2Dspace%3A%20pre%2Dwrap%3B%20%0A%7D%0Apre%20%7B%0Aborder%2Dradius%3A%203px%3B%0Amargin%3A%205px%200px%2010px%200px%3B%0Apadding%3A%2010px%3B%0A%7D%0Apre%3Anot%28%5Bclass%5D%29%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Acode%20%7B%0Afont%2Dfamily%3A%20Consolas%2C%20Monaco%2C%20%27Courier%20New%27%2C%20monospace%3B%0Afont%2Dsize%3A%2085%25%3B%0A%7D%0Ap%20%3E%20code%2C%20li%20%3E%20code%20%7B%0Apadding%3A%202px%200px%3B%0A%7D%0Adiv%2Efigure%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0Aimg%20%7B%0Abackground%2Dcolor%3A%20%23FFFFFF%3B%0Apadding%3A%202px%3B%0Aborder%3A%201px%20solid%20%23DDDDDD%3B%0Aborder%2Dradius%3A%203px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Amargin%3A%200%205px%3B%0A%7D%0Ah1%20%7B%0Amargin%2Dtop%3A%200%3B%0Afont%2Dsize%3A%2035px%3B%0Aline%2Dheight%3A%2040px%3B%0A%7D%0Ah2%20%7B%0Aborder%2Dbottom%3A%204px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Apadding%2Dbottom%3A%202px%3B%0Afont%2Dsize%3A%20145%25%3B%0A%7D%0Ah3%20%7B%0Aborder%2Dbottom%3A%202px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Afont%2Dsize%3A%20120%25%3B%0A%7D%0Ah4%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23f7f7f7%3B%0Amargin%2Dleft%3A%208px%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Ah5%2C%20h6%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23ccc%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Aa%20%7B%0Acolor%3A%20%230033dd%3B%0Atext%2Ddecoration%3A%20none%3B%0A%7D%0Aa%3Ahover%20%7B%0Acolor%3A%20%236666ff%3B%20%7D%0Aa%3Avisited%20%7B%0Acolor%3A%20%23800080%3B%20%7D%0Aa%3Avisited%3Ahover%20%7B%0Acolor%3A%20%23BB00BB%3B%20%7D%0Aa%5Bhref%5E%3D%22http
|
|||
|
|
|||
|
</head>
|
|||
|
|
|||
|
<body>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<h1 class="title toc-ignore">Clustering Graphics</h1>
|
|||
|
<h4 class="author"><em>Catherine Hurley</em></h4>
|
|||
|
<h4 class="date"><em>2019-01-07</em></h4>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<p>This package will order panels in scatterplot matrices and parallel coordinate displays by some merit index. The package contains various indices of merit, ordering functions, and enhanced versions of pairs and parcoord which color panels according to their merit level. For details on the methods used, consult “Clustering Visualisations of Multidimensional Data”, Journal of Computational and Graphical Statistics, vol. 13, (4), pp 788-806, 2004.</p>
|
|||
|
<div id="displaying-a-correlation-matrix" class="section level2">
|
|||
|
<h2>Displaying a correlation matrix</h2>
|
|||
|
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(gclus)
|
|||
|
<span class="co">#> Loading required package: cluster</span>
|
|||
|
<span class="kw">data</span>(longley)
|
|||
|
longley.cor <-<span class="st"> </span><span class="kw">cor</span>(longley)
|
|||
|
longley.color <-<span class="st"> </span><span class="kw">dmat.color</span>(longley.cor)</code></pre></div>
|
|||
|
<p><code>dmat.color</code> assigns three colours to the correlations according to the correlation magnitude. High correlations are in pink, the middle third are in blue, and the botom third are in yellow.</p>
|
|||
|
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">par</span>(<span class="dt">mar=</span><span class="kw">c</span>(<span class="dv">1</span>,<span class="dv">1</span>,<span class="dv">1</span>,<span class="dv">1</span>))
|
|||
|
<span class="kw">plotcolors</span>(longley.color,<span class="dt">dlabels=</span><span class="kw">rownames</span>(longley.color))</code></pre></div>
|
|||
|
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAYAAAB91L6VAAAEGWlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvphHvRFys2weqvp+krbWKIX7nhDbzLOItiM8358pTwdirqpPFnMF2xLc1WvLyOwTAibpbmvHHcvttU57y5+XqNZrLe3lE/Pq8eUj2fXKfOe3pfOjzhJYtB/yll5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yuO+WSXbt26S8uqS9VFbWpbxurx8qmV5BHjx7V33AufE/1mXD58uULHy7wWrVR/zCIiSn47xD1LemyZcvqtocPH9bjLnBhES8yUzYWcTQyDm3uVCcyJlrELBNjdxRxNHIOZaUU/LsTOTOP7JlG6t/59JWrpfnJp6/x8fFG3gDn
|
|||
|
<p>If you want to change the colour scheme:</p>
|
|||
|
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">longley.color <-<span class="st"> </span><span class="kw">dmat.color</span>(longley.cor, <span class="dt">byrank=</span><span class="ot">FALSE</span>)
|
|||
|
longley.color <-<span class="st"> </span><span class="kw">dmat.color</span>(longley.cor, <span class="dt">breaks=</span><span class="kw">c</span>(<span class="op">-</span><span class="dv">1</span>,<span class="dv">0</span>,.<span class="dv">5</span>,.<span class="dv">8</span>,<span class="dv">1</span>),
|
|||
|
<span class="kw">cm.colors</span>(<span class="dv">4</span>))</code></pre></div>
|
|||
|
<p>The plot is easier to interpret if variables are reorded prior to plotting.</p>
|
|||
|
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">par</span>(<span class="dt">mar=</span><span class="kw">c</span>(<span class="dv">1</span>,<span class="dv">1</span>,<span class="dv">1</span>,<span class="dv">1</span>))
|
|||
|
longley.o <-<span class="st"> </span><span class="kw">order.hclust</span>(longley.cor)
|
|||
|
longley.color1 <-<span class="st"> </span>longley.color[longley.o,longley.o]
|
|||
|
<span class="kw">plotcolors</span>(longley.color1,<span class="dt">dlabels=</span><span class="kw">rownames</span>(longley.color1))</code></pre></div>
|
|||
|
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAYAAAB91L6VAAAEGWlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7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EEEEAAAXcFCGB3fWkdAQQQQACBmAIEcEwWDiKAAAIIIOCuAAHsri+tI4AAAgggEFOAAI7JwkEEEEAAAQTcFSCA3fWldQQQQAABBGIKEMAxWTiIAAIIIICAuwIEsLu+tI4AAggggEBMAQI4JgsHEUAAAQQQcFfAtQA+cOCANG7cWBYtWuTaDAYOHCjfffddmfbvvvtuadGihbRq1cp8XXHFFWXOs4MAAggggIANAlluDeKdd96Rbt26yQsvvCBdu3Yt082xY8ckOzvbHNPXWVlZUq5cOYk8HnrD8ePHpXz58qFd87OkpEQyMjJk9+7doucjt127dsmrr74qrVu3jjwcfp/2FblpW9q3ful29OhRqVChQuQlotdEvq+0tFSKi4ulSpUqZa5jBwEEEEAAgUQFyqZRou9K4DoNwalTp8q1114rGornnnuuvP766zJ58mSzP2DAAPnkk09M2H399ddy++23y/Lly+X777+X+fPnS6VKleSBBx4wIauBN3LkSLn00ktNuL744otSsWJF2blzZwIj+d8lTz75pCxevNgE91133SW33HKLtG/f3vwh0KxZM3nooYfk1ltvlbp165pjb7/9tixYsEBeeuklOXHihAn0xx9/3Ixx8ODBkpubK0VFRfLxxx+f9gdCwoPiQgQQQACBwAq4EsBfffWVVKtWzYSUBuvLL78sjz32mGiQnn/++bJw4UKZMmWK1KpVS9544w156qmn5JtvvpFZs2aJhpwGs66Qa9eubVbQmzdvltGjR8v48eNl6NChsnXrVsnMzDTtx6rcbbfdJpUrVzan/vjHP8pVV10lS5culTlz5pjVbF5enuTn55sA174aNGggN910k/zlL3+R7t27y5tvvin/+c9/TJ8ffvihVK1aVfr16yfbtm2TefPmSc+ePUXb1UA/fPiwVK9ePdYwOIYAAggggEBcAVcCWFe5+mz2yiuvlEOHDplVrAanbk2aNAkPRp8R61azZk0Tcvo6JydH9PnxmjVrzGpz1apVetgE+o4dO6Rhw4bhFWfbtm3NuehvunqNvAX97rvvioaubnorWVevGzZsMCGv4aubhnyovb59+0phYaGsXbtW9LVueht6/fr1MmjQIPPHRPPmzU2bbdq0Mef5hgACCCCAQDICjn8IS5/JfvDBB6LBqavLZcuWiYaVrm5105VraIt8HToW+tm5c2ezGp0xY4ZMmDBBLr/8cnN7WFfK+qxYNw3pRLZOnTrJihUrzKW6Cl+9erXUr1+/zFj0ebUe1+1vf/ub/Pvf/zZhryt0HUOfPn2kUaNGZvV+3333ycaNG80z4NC8zBv5hgACCCCAQIICjgfwzJkzRQMv8gNK+rxXbx8ns11zzTXmlu/NN98sd9xxhzRt2tQE5pgxY0z7+mlnXTnrprez9XlxvE1XvO3atZPevXubn8OHDw/fog695ze/+Y38/e9/F+1Pg1hXzMOGDRO9na3Pi//1r3+Z0NYV+P33329Wxrpq1tvbbAgggAACCCQrkHHy1Jbsm2Jdv337dtm0aZM4/d9+9NPG+oGsyC3yk9ORx3/qtb5PV91nWnkfOXLEfMArsq1YY9Db5PqcO7SVyhehl/xEAAEEEPChwKKF26RRw5bmbqwT03PlGbATAwu1ER2+ejz0X5hC
|
|||
|
</div>
|
|||
|
<div id="displaying-a-pairs-plot-with-coloured-panels" class="section level2">
|
|||
|
<h2>Displaying a pairs plot with coloured panels</h2>
|
|||
|
<p><code>cpairs</code> is a version of <code>pairs</code> All the high-correlation panels appear together in a block.</p>
|
|||
|
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">par</span>(<span class="dt">mar=</span><span class="kw">c</span>(<span class="dv">1</span>,<span class="dv">1</span>,<span class="dv">1</span>,<span class="dv">1</span>))
|
|||
|
<span class="kw">cpairs</span>(longley, <span class="dt">order=</span> longley.o,<span class="dt">panel.color=</span> longley.color)</code></pre></div>
|
|||
|
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAYAAAB91L6VAAAEGWlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvl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zl59sd9u2bdi5c6fSH1etWlW90D7153lR+mUHf3gF6le5kPLesWTOnBnZsmVDyZIllQ6Y4n/qit0Xv95D99f6pX3hzN1fit/p10NDVv6DG13vinfHf/f9864f0zHv+jOdE4kV0qVLh6VLl0IkXr+9Dpja1Z9Bi4AmwEGLt797ozGIg4MDTMY5+fLlU0STBlPU/ZoKv7snyKbjPn2yXRKEwoULqyq1atVSxlg+9VepUiWfmtLHPSEg4knQxnHHjh1KqsDTJLwhQoRQNXkPP378qLhfHhDhlzrn13uoGvvvP7+0bzLWC4h+3Y/hT/r+u++fX7HivaLOV1QH6o+64AULFiBBggS/tQ74dRy6fsAgoEXQAYNjoLdCAnn06FFw58u/48ePK9EzrTHJXX379g2iE8a5c+eQJk0aX4+HHBPFkCZjE1pYU6TtU3++bvgPr0gL1eHDh2PPnj1m4ktI2rdvj0mTJil0rl+/jggRIiBhwoTIkyePkkTwxIYNG5RBnKrkx//82n5A9evHYQab6r/7/vkViCdPnqgNMwkvC0XRNPQL6nH4ddy6vg8IBK3KWff2OwiI/slVXjZXcTVyHThwoLmpESNGuBYoUMA1bdq0rosWLTIf9+2XZcuWudIYR/SSrsLh
|
|||
|
<p>If the <code>order</code> is not supplied, then the variables are plotted in default dataset order.</p>
|
|||
|
</div>
|
|||
|
<div id="displaying-a-pcp-plot-with-coloured-panels" class="section level2">
|
|||
|
<h2>Displaying a PCP plot with coloured panels</h2>
|
|||
|
<p><code>cparcoord</code> is a versions of <code>`parcoord</code> where panels can be coloured. Again, the pink panels have high correlation, blue panels have middling correlation, and yellow panels have low correlation.</p>
|
|||
|
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">cparcoord</span>(longley, <span class="dt">order=</span> longley.o,<span class="dt">panel.color=</span> longley.color,
|
|||
|
<span class="dt">horizontal=</span><span class="ot">TRUE</span>, <span class="dt">mar=</span><span class="kw">c</span>(<span class="dv">2</span>,<span class="dv">4</span>,<span class="dv">1</span>,<span class="dv">1</span>))</code></pre></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9o4qR+qFmzPdau/R1t235toaNM+sPav/9vtP9+JHr2+h+GDeuIsLB/6KaDk/6NyzuUFpAWkBaQFrA4C2TIlAlDZs9Ey25dMHf4SGxZuhS9x49D1a8bWtxYrWFAYRS1v3Xliojqe4vI/iU8938MT68iIrpfqV5ddB4+FLk9PPDFF19Ywy0ZPEYJAAw2VcLumDq1HTZvmY6qVX7AV18Vhbu7jGgm5BNgvuWI4fOwfv0+bN02AxUrltBcngGAnKQFpAWkBaQFpAUSzwKu+fJh1tbNOHv0GGYPHY4N8xei7+SJIkqdeKOy7Ct/+vgRvhSpFzQeiup7X7gE/7t3kbdQQRHVL12lCtr16wPX/PmRLFkyy74ZE4xOAgATGNHUp9i0aRNFmkuhcdMqGDuuJ1q1HIiTp35FypQyzWdqW+s73/37j8nmg5A5cwZcuboVTk6yKE6fneQ6aQFpAWkBaYHEtUCZalXx68m/8Puv69C/eUuUrloFPX4ehaw5cybuwBL56p8/f8adG946nP1LuHfzFnJ7eghnv1CpUkSf6gx3cv5tlUIlAUAiv6T6Ll+rVi307z8Yj58+RY8erXDo4EkMGzoH02cM0Le7XGdCC2zbRio/Xcdj2PBO6Nu3jQnPLE8lLSAtIC0gLSAtYHoLcH1ao3ZtUbtZU6ydPRdtKlRC0x9+wPc/9YO9g4PpL2hhZ2SRjvu3bomIvhrd97t+A8558mg4+8XQsM13gtaTSirEaZ+eBABaU1jOgpOTE3bsXICGDbsgbVp7rFg5DkW9mqFGzXKoV6+i5Qw0CY0kLOwD+vebhgMHTmLf/kUoWbJgEro727mVFwSa//V/gIIuzkieTP682c6Tl3cqLSAtkDpNGsFXb9zheywaOx5NvYqj
|
|||
|
</div>
|
|||
|
<div id="plotting-re-ordered-dendrograms." class="section level2">
|
|||
|
<h2>Plotting re-ordered dendrograms.</h2>
|
|||
|
<p><code>eurodist</code> is a built-in distance matrix giving the distance between European cities.</p>
|
|||
|
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">par</span>(<span class="dt">mar=</span><span class="kw">c</span>(<span class="dv">1</span>,<span class="dv">1</span>,<span class="dv">1</span>,<span class="dv">1</span>))
|
|||
|
<span class="kw">data</span>(eurodist)
|
|||
|
dis <-<span class="st"> </span><span class="kw">as.dist</span>(eurodist)
|
|||
|
hc <-<span class="st"> </span><span class="kw">hclust</span>(dis, <span class="st">"ave"</span>)
|
|||
|
<span class="kw">plot</span>(hc)</code></pre></div>
|
|||
|
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAGACAYAAABFmt0fAAAEGWlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvphHvRFys2weqvp+krbWKIX7nhDbzLOItiM8358pTwdirqpPFnMF2xLc1WvLyOwTAibpbmvHHcvttU57y5+XqNZrLe3lE/Pq8eUj2fXKfOe3pfOjzhJYtB/yll5SDFcSDiH+hRkH25+L+sdxKEAMZahrlSX8ukqMOWy/jXW2m6M9LDBc31B9LFuv6gVKg/0Szi3KAr1kGq1GMjU/aLbnq6/lRxc4XfJ98hTargX++DbMJBSiYMIe9Ck1YAxFkKEAG3xbYaKmDDgYyFK0UGYpfoWYXG+fAPPI6tJnNwb7ClP7IyF+D+bjOtCpkhz6CFrIa/I6sFtNl8auFXGM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SsxvNDMuuFfcOkXZPh+zDHH+HZomxdfWD777LM3vn/qU59qHOumm25qLJ977rkb343I3Ngm+6WTAsT2X/7ylxtt3X333Y0m1lxzzcZylJSg1HCuaaVmq6228tuhNKJQ8HJ/97vf3djXCNaJWWYa7a633nqNdShdQcGaYYYZGsuDAtTpnFHYUDYDdtn/n/3sZxvH5Qu/wzacj3HD/G8UprA87NDp2JdffnljH84xfc5gYC5F35SR8hvbzTvvvB7H9PiBGccHi/TYmzsyQWGTCAEh8DYCcoHZk0oiBEAA9wluJyQb5eUXVvgHF88NN9zgj/DTn/7Uu9twuZ177rlumWWWcWb98C4eIr4eeOCBRk823HBD/xvSL+4TiNH8n2eeeZxZi7wL5Nhjj/Xbm+XJ2Yu2sW/4gquFbcy64A4++OCwuKv/adzgBCG/+MUvHJFYiFmBvDuLc+BccB/ts88+fl36D+6nFVZYwfGfT3A94hLkPBBT9hqRdyuttJKPiCNa74ADDnCvvfZaurlR35ud8x577OGI4EPMguTMAuVwia6xxhp+mVnK3Gmnnea/X3fddY7fCHyse+65x7uh9ttvPx8x6Fe0+NPs2HDOTOlx8Mr+9a9/+XH78Y9/7Fswy5r74x//OKo1U3L8NWGWQ/f1r3/dr3/hhRf8uT/44IOO5WaF9Mtxt4XxGNWQFgiBYUXgbV1I34TAcCNg5ObG7NpezoXAiLUAGV+jYbnBioEL5+c//3liilHTftjzyvd1yy23bKzHZRSW48YJgmtqrrnm8uuC6yptkdhggw3Cpm3/57EAfe9732v0ATchYqHzfhmWqWeeeaZxDHvBN7Y1BcIvDxYgziNYPVjx29/+trHtiSee6Lc1ZaOxzCL2/LLwJ1jyaKeZBajZOS+00EK+vfe85z1JcGPSnikOjeOsuOKK/hDpY59//vnhsMnrr7/esARx7CB58WZ/BDfWUUcd1TguLjgkbQE68sgj/TL+mALV
|
|||
|
<p><code>order.hclust</code> re-orders a dendrogram to improve the similarity between nearby leaves. Applying it to the <code>hc</code> object:</p>
|
|||
|
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">par</span>(<span class="dt">mar=</span><span class="kw">c</span>(<span class="dv">1</span>,<span class="dv">1</span>,<span class="dv">1</span>,<span class="dv">1</span>))
|
|||
|
hc1 <-<span class="st"> </span><span class="kw">reorder.hclust</span>(hc, dis)
|
|||
|
<span class="kw">plot</span>(hc1)</code></pre></div>
|
|||
|
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAGACAYAAABFmt0fAAAEGWlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvphHvRFys2weqvp+krbWKIX7nhDbzLOItiM8358pTwdirqpPFnMF2xLc1WvLyOwTAibpbmvHHcvttU57y5+XqNZrLe3lE/Pq8eUj2fXKfOe3pfOjzhJYtB/yll5SDFcSDiH+hRkH25+L+sdxKEAMZahrlSX8ukqMOWy/jXW2m6M9LDBc31B9LFuv6gVKg/0Szi3KAr1kGq1GMjU/aLbnq6/lRxc4XfJ98hTargX++DbMJBSiYMIe9Ck1YAxFkKEAG3xbYaKmDDgYyFK0UGYpfoWYXG+fAPPI6tJnNwb7ClP7IyF+D+bjOtCpkhz6CFrIa/I6sFtNl8auFXGMTP34sNwI/JhkgEtmDz14ySfaRcTIBInmKPE32kxyyE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GLYmP/85z+HKX7Jmd773ve6U0891X32s59NftXVz/Hj8cYbb3RFIe3qDmplIiACuQnIApQboQaoG4HddtvN/epXv/K7tcwyy7gtttjCve1tb/PWoL/+9a/ulVde8QrSeuut5y0fvdj/T37yk361KEC9EKxhKDkoe//5z3/cLbfc4h566CH32GOPuc0339zde++9bvHFF+/FpmmdIiACIpCJQPl2+kyboZlEoBoEpk6d2lB+1lhjDXfnnXe6o446yh1yyCHuL3/5i/vyl7/sN/TZZ59148ePL2WjUSpQJB5++GH33//+t+N1vPTSS+4f//hH5uWx8GQVXIEnnHCCO+WUU9wvfvELd99997n999/fL45C9O1vfzt1KJJOH3300bb2i/148sknU8cLE2HGuLgF25FW+4zLj+M8koR1t5tQm7ZurFVPPPGEVyCffvrpkVbtv3/11Vf9MsmZ4fbMM88kJ+uzCIhAIIALTCICIvB/BD7/+c9TFsK/zKoxDIvdlCKzEEVnn312ZDfcxvc77rhjYzm7Ifrp2267bTTPPPNECy+8cGM+3txwww1+Ot+Z8tD47qmnnoq23377aNSoUY2xLHYlWmeddaLHH3/cz/fHP/7RLxu2kXkZ56c//WljHHOPRR/4wAcilmU+i8+JvvnNb0avvfbakHlYjtfkyZOj5ZZbzs9rsU2R3fQb88XfmDLV2C5z/8W/8u9nzpwZmWXIz8O67cbcmId177333tF8883nv7cYqWiVVVaJ2Na47LLLLn6bVl999eiee+6JPv7xj0fMy36Yey266qqr4rNHpmxFu+66a2QWOj8P4x9xxBHRDjvs4D+znCkVfhnWNdI+m8IZ7bXXXpFZ1hrLv+c974mOPvroxjhhA5h39913b6z7ne98Z2RKsZ83rCfMm2Xdhx12mD9W4djyf6mllooshikME/32t79t7INZI6NNN900mnPOOf22vu9974tuu+22yOLVok9/+tORuWH9ObDiiitGprw3xtAbERCB/yPgBEIEROAtAmPHjvU3k9GjR781McO7NAXoC1/4gh+Lm2Fcrr322sbN9cwzz2x8teaaa/rpKDUoMHElhhuaWTf8DS5+gwzvjznmGD8OY3PjC9Pnn3/+xvu11lqrsa5p06Y1pi+yyCKN9xbI3Jgn+WYkBYj5v/jFLzbG+tvf/tYY4jOf+UxjOkpKUGrY17hSs9122/n5UBpRKLi5v+td72osawHWkVlmGuOuv/76je9QuoKCNffcczemBwVopH1GYUPZDOyS/z/3uc811ssbPod52B+LDfOfUZjC9LDASOu+9NJLG8uwj/F9hoG5FP1QFpTfmG+xxRbzHOPHD2asHxbxY2/uyAiFTSICIvAWAbnA7EolEQEI4D7B7YQks7z8xBL/4OK58cYb/RpOPPFE727D5XbOOee4D3/4w86sH97FQ8bXAw880NiSTTbZxH8m6Bf3CYHR/F900UWdWYu8C+S4447z85vlydmNtrFseIOrhXnMuuB++MMfhskd/Y9zIyYIueCCCxyZWIhZgbw7i31gX3Af7bfffv67+B/cT+PGjXP85xVcj7gE2Q/ElL1G5t0nPvEJnxFHtt7BBx/sZsyYER9u2Pu0fd53330dGXyIWZCcWaAcLtG1117bTzNLmTv99NP9++uuu87xGSEe6+9//7t3Qx144IE+Y9B/0eRP2rqJOTOlxxFX9sILL/jj9pOf/MSPYJY1d9NNNw0bzZQcf06Y5dB97Wtf898///zzft8ffPBBx3SzQvrpuNvC8Rg2kCaIwKASeEsX0jsRGGwCFtzceLq2m3NbMPJagCxeo2G5wYqBC+ess86KTDFK3Q67Xvlt/dKXvtT4HpdRmI4bJwiuqYUWWsh/F1xXcYvERhttFGZt+T+LBegHP/hBYxtwEyKWOu+nYZn697//3ViH3eAb85oC4acHCxD7EawefHH11Vc35j355JP9vKZsNKZZxp6fFv4ESx7jpFmA0vZ5ySWX9OMtuOCCUXBjMp4pDo31rLbaan4V8XWfd955YbXR66+/3rAEse4gWXmzPIIba+LEiY314oJD4hagCRMm+Gn8MQWq
|
|||
|
<p>Both dendrograms correspond to the same tree structure, but the second one shows that Paris is closer to Cherbourg than Munich, and Rome is closer to Gibralter than to Barcelona.</p>
|
|||
|
<p>We can also compare both orderings with an image plot of the colors. The second ordering seems to place nearby cities closer to each other.</p>
|
|||
|
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">
|
|||
|
<span class="kw">layout</span>(<span class="kw">matrix</span>(<span class="dv">1</span><span class="op">:</span><span class="dv">2</span>,<span class="dt">nrow=</span><span class="dv">1</span>,<span class="dt">ncol=</span><span class="dv">2</span>))
|
|||
|
<span class="kw">par</span>(<span class="dt">mar=</span><span class="kw">c</span>(<span class="dv">1</span>,<span class="dv">6</span>,<span class="dv">1</span>,<span class="dv">1</span>))
|
|||
|
cmat <-<span class="st"> </span><span class="kw">dmat.color</span>(eurodist, <span class="kw">rev</span>(<span class="kw">cm.colors</span>(<span class="dv">5</span>)))
|
|||
|
<span class="kw">plotcolors</span>(cmat[hc<span class="op">$</span>order,hc<span class="op">$</span>order], <span class="dt">rlabels=</span><span class="kw">labels</span>(eurodist)[hc<span class="op">$</span>order])
|
|||
|
|
|||
|
<span class="kw">plotcolors</span>(cmat[hc1<span class="op">$</span>order,hc1<span class="op">$</span>order], <span class="dt">rlabels=</span><span class="kw">labels</span>(eurodist)[hc1<span class="op">$</span>order])</code></pre></div>
|
|||
|
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAwAAAAFQCAYAAAAIkBlQAAAEGWlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25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zeP95I3Ife9l+Q3nw/v3jv3zNy53xumnDkzJ+RuXBAGEiABEiABEiABEiABEiCBNEEgXZp4S74kCZAACZAACZAACZAACZCAEuAAgH8IJEACJEACJEACJEACJJCGCHAAkIY+Nl+VBEiABEiABEiABEiABDgA4N8ACZAACZAACZAACZAACaQhAhwApKGPzVclARIgARIgARIgARIgAQ4A+DdAAiRAAiRAAiRAAiRAAmmIAAcAaehj81VJgARIgARIgARIgARIgAMA/g2QAAmQAAmQAAmQAAmQQBoiwAFAGvrYfFUSIAESIAESIAESIAES4ACAfwMkQAIkQAIkQAIkQAIkkIYIcACQhj42X5UESIAESIAESIAESIAEOADg3wAJkAAJkAAJkAAJkAAJpCECHACkoY/NVyUBEiABEiABEiABEiABDgD4N0ACJEACJEACJEACJEACaYgABwBp6GPzVUmABEiABEiABEiABEiAAwD+DZAACZAACZAACZAACZBAGiLAAUAa+th8VRIgARIgARIgARIgARLIQASph8BPP/0kv/32W+p5Ib4JCZBAPAIZM2aU/Pnzx4vjBQmAAOt//h2QQOomkNz1PwcAqeTvBZX/N998I4UKFfL5je5e8FlUBf+bz0ye0iSQFAK5kpLIIM0VA9lgE8106pQ0atSIg4Bg+zABLg/r/wB/AIcfzzrRYcApJPvkrv85AEghHz6xYkLz/3//939Sr169xERd9+/Md536dLK0nk9iFCKB+yLQ4L5SJ574x8RFglaibEwMZ/mC9usErmCs/wPH3h9PZp3oD8rB/4zkrv+5BiD4vzlLSAIkQAIkQAIkQAIkQALJRoADgGRDyYxIgARIgARIgARIgARIIPgJcADg9o1GjRolzz33XLzYJUuW6AKrBQsWyEcffRTvHi9IgARIgARSBwHW/6njO/ItSIAEEifAAYCNUWxsrMyfP19w/PHHPy2FJ02aJL/88otcv35drl69Knfu3FEZW1I9vX37tnuU/O9//4sXh7Q3btyIF8cLEiABEiCBwBJg/R9Y/nw6CZCAfwlwAGDjHR0dLVWrVpX27dvL5MmT9c6mTZtkx44d0q9fP72GTM+ePaVMmTISFRXlimvVqpXOHAwf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iABEiABEiABEggKQQ4AEgKNaYhARIgARIgARIgARIggRRKgGsAEvhwcOj18MMPq8StW7ekRo0aMnbsWMmYMWMCqXiLBEiABEggpRNg/Z/SvyDLTwIkkBABzgAkQOfnn3+WtWvX6j94CD527Jh89dVXrhS3b992ndtPfv31V9cl9o92D97SucvxmgRIgARIIDAEWP8HhjufSgIk4B8CnAHwkXPmzJl1n39rD/8RI0bIunXrJCQkRLp06SJt
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<!-- dynamically load mathjax for compatibility with self-contained -->
|
|||
|
<script>
|
|||
|
(function () {
|
|||
|
var script = document.createElement("script");
|
|||
|
script.type = "text/javascript";
|
|||
|
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
|
|||
|
document.getElementsByTagName("head")[0].appendChild(script);
|
|||
|
})();
|
|||
|
</script>
|
|||
|
|
|||
|
</body>
|
|||
|
</html>
|