swap_hclust: Swap clusters

Description Usage Arguments Details Note Author(s) Examples

View source: R/swap_hclust.R

Description

Function that allows to swap to clusters in a hclust object.

Usage

1

Arguments

x

[hclust] Cluster of hclust class to be swapped.

Details

This function allows the user to swap clusters in a hclust object by clicking on them.

When the plot window is active after running this function, simply click on the two cluster you want to swap.

Note

Swapping cluster do not change the topology of the cluster (i.e.: the results are the same). It is only intended for representation purpoises.

Author(s)

Víctor Moreno-González <vmorg@unileon.es>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

# Draw any cluster
hc <- hclust(dist(USArrests))
plot(hc)

# Swap
swap_hclust(hc)
## 1- Click on two sub-clusters
## 2- Do it as many times you want
## 3- Press ESC or Finish

## End(Not run)

vmoreg00/projects documentation built on April 14, 2020, 4:02 p.m.