Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

eclust: redefine k for h-cluster?

$
0
0

Hi is there a way to redefine k without having to rerun the hclust? Example

library (factoextra)
data("USArrests")
df <- scale(USArrests)

ik=4
res.hk <- eclust(df , "hclust", k = ik, hc_metric ="spearman",
                 nstart = 25, graph = FALSE)
fviz_silhouette(res.hk)
  cluster size ave.sil.width
1       1   15          0.60
2       2    5          0.66
3       3   23          0.42
4       4    7          0.7

Now I want to set k to 6 instead? Is there a way to do this without having to rerun the eclust function? thanks!


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>