as_hclust_fixed: Convert dendrogram Objects to Class hclust

Description Usage Arguments Value See Also Examples

View source: R/dendextend.R

Description

Convert dendrogram Objects to Class hclust while preserving the call/method/dist.method values of the original hclust object (hc)

Usage

1

Arguments

x

any object which has an as.hclust method. (mostly used for dendrogram)

hc

an old hclust object from which to re-use the call/method/dist.method values

...

passed to as.hclust

Value

An hclust object (from a dendrogram) with the original hclust call/method/dist.method values

See Also

as.hclust

Examples

1
2
3
4
5
hc <- hclust(dist(USArrests[1:3, ]), "ave")
dend <- as.dendrogram(hc)

as.hclust(dend)
as_hclust_fixed(dend, hc)

Example output

---------------------
Welcome to dendextend version 1.12.0
Type citation('dendextend') for how to cite the package.

Type browseVignettes(package = 'dendextend') for the package vignette.
The github page is: https://github.com/talgalili/dendextend/

Suggestions and bug-reports can be submitted at: https://github.com/talgalili/dendextend/issues
Or contact: <tal.galili@gmail.com>

	To suppress this message use:  suppressPackageStartupMessages(library(dendextend))
---------------------


Attaching package: 'dendextend'

The following object is masked from 'package:stats':

    cutree


Call:
as.hclust.dendrogram(x = dend)

Cluster method   : NA 
Distance         : NA 
Number of objects: 3 


Call:
hclust(d = dist(USArrests[1:3, ]), method = "ave")

Cluster method   : average 
Distance         : euclidean 
Number of objects: 3 

dendextend documentation built on May 9, 2021, 1:06 a.m.