Convert dendrogram Objects to Class hclust while preserving the call/method/dist.method values of the original hclust object (hc)
as_hclust_fixed(x, hc, ...)
An hclust object (from a dendrogram) with the original hclust call/method/dist.method values
hc <- hclust(dist(USArrests[1:3, ]), "ave")
dend <- as.dendrogram(hc)
as.hclust(dend)
#>
#> Call:
#> as.hclust.dendrogram(x = dend)
#>
#> Cluster method : NA
#> Distance : NA
#> Number of objects: 3
#>
as_hclust_fixed(dend, hc)
#>
#> Call:
#> hclust(d = dist(USArrests[1:3, ]), method = "ave")
#>
#> Cluster method : average
#> Distance : euclidean
#> Number of objects: 3
#>