【发布时间】:2016-02-11 16:03:50
【问题描述】:
我正在使用 Power Bi 中的 R 并显示一个 Clusplot 图表 - 工作正常。
但是如何将 column1 显示为集群中的标签,而不是数字 (1-27)。
这是我的代码:
library(cluster)
D=daisy(dataset, metric='gower')
H.fit <- hclust(D, method="ward")
plot(H.fit)
groups <- cutree(H.fit, k=5, tree) # cut tree into 4 clusters
rect.hclust(H.fit, k=3, border="red")
clusplot(dataset, groups, color=TRUE, shade=TRUE, lines=0, main= 'Customer segments', span=F, labels=2)
【问题讨论】:
标签: r cluster-analysis powerbi