sp_dendextend: Hierarchical cluster diagram

Description Usage Arguments Examples

View source: R/sp_dendrogram.R

Description

Hierarchical cluster diagram

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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,
  ...
)

Arguments

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".

...

Examples

1
2
3
4
5
6
7
8
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")

Tong-Chen/YSX documentation built on Jan. 25, 2021, 2:49 a.m.