ggdendro

    2熱度

    1回答

    我的問題是關於Andrie的answer到我以前的問題。我的問題是,是否可以在樹狀圖的相應部分下顯示變量標籤和汽車標籤? library(ggplot2) library(ggdendro) data(mtcars) x <- as.matrix(scale(mtcars)) dd.row <- as.dendrogram(hclust(dist(t(x)))) ddata_x <- d

    2熱度

    1回答

    我正在使用ggdendrogram繪製樹狀圖,但我想讓左側的標籤使圖更直觀。我該怎麼做呢?謝謝!!! library(ggplot2) library(ggdendro) ### Data countries <- c("UK","AU","SA","CH") distmatrix <- matrix(c(0.00, 0.16, 1.01, 0.97, 0.16, 0.00, 0.84,

    5熱度

    1回答

    當我使用偉大的包ggdendro來繪製我的樹時,我遇到了一個問題:有一天,它突然產生的樹的所有標籤都消失了。 當我在本地機器和服務器中運行以下代碼時,我得到了不同的結果。服務器版本中不存在本地計算機和標籤中的標籤。 fit = ClustOfVar::hclustvar(X.quanti = mtcars) ggdendro::ggdendrogram(as.dendrogram(fit),r

    2熱度

    1回答

    我在做聚類分析並創建樹狀圖。我使用了ggdendrogram包,並希望使用它的輸出ggplot2。我想知道如何獲得與葉標籤相同的X標籤。由於 D1 <- as.dist( matrix( data= c( 0, 9, 3, 6, 11 , 9, 0, 7, 5, 10 , 3, 7, 0, 9, 2 , 6, 5, 9, 0, 8

    2熱度

    1回答

    我想通過使用ggplot2創建一個漂亮的樹狀圖。 這是我在做什麼重複的例子: library(ggplot2) library(ggdendro) data(mtcars) x <- as.matrix(scale(mtcars)) dd.row <- as.dendrogram(hclust(dist(t(x)))) mtcars_dendrogram <- ggdendrogram

    14熱度

    4回答

    Didzis Elferts展示瞭如何使用GGPLOT2和ggdendro繪製一個樹狀圖: horizontal dendrogram in R with labels 這裏是代碼: labs = paste("sta_",1:50,sep="") #new labels rownames(USArrests)<-labs #set new row names hc <- hclust(dis