gjwgit / rattleng

The New Generation R Analytics Desktop App
GNU General Public License v3.0
20 stars 9 forks source link

CLUSTER: Add visualisation (eg. ggdendro) #530

Closed zheyxu closed 1 month ago

zheyxu commented 1 month ago
gjwgit commented 1 month ago

Example for hclust:

library(ggdendro)

library(ggplot2)
hc <- hclust(dist(USArrests), "ave")

# Demonstrate plotting directly from object class hclust
p <- ggdendrogram(hc, rotate = FALSE)
print(p)
ggdendrogram(hc, rotate = TRUE)

# demonstrate converting hclust to dendro using dendro_data first
hcdata <- dendro_data(hc)
ggdendrogram(hcdata, rotate = TRUE, size = 2) +
  labs(title = "Dendrogram in ggplot2")
zheyxu commented 1 month ago

Implemented work: Image Image Image

zheyxu commented 1 month ago

Data plot has not been implemented yet after hours of try:

Image

zheyxu commented 1 month ago

https://github.com/gjwgit/rattleng/pull/541 for the current work.