View source: R/sp_dendrogram.R
sp_dendextend | R Documentation |
Hierarchical cluster diagram
sp_dendextend(
data,
group_variable = NULL,
branch_order = NULL,
method = "complete",
k = k,
labels_size = 0.5,
shape = "tree",
pic_title = NULL,
pic_flip = TRUE,
node_size = 0.007,
legend_site = "topleft",
saveplot = NULL,
...
)
data |
A data frame. |
group_variable |
Specifies a column as group. |
branch_order |
Specify branch order. |
method |
The agglomeration method to be used. This should be (an unambiguous abbreviation of) one of "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC). |
k |
Number of groups. |
labels_size |
Labels size. |
shape |
Tree or circles. |
pic_title |
Title of the graph. |
pic_flip |
TRUE for horizontal, FALSE for vertical. Default TRUE. |
node_size |
Node size. |
legend_site |
Legend site. Optional, "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center". |
... |
data<-matrix(rnorm(200),nrow = 50)
rownames(data)<- paste0("dendextend", 1:50)
colnames(data)<- paste0("zhou", 1:4)
sp_dendextend(data = data,k = 3,labels_size = 0.3)
data<- data.frame(ID = letters[1:5], apple = runif(50), banana = runif(50), watermelon = runif(50))
sp_dendextend(data = data, k = 5, method = "single", shape = "circle")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.