cor_hcl: Correlation hierarchical cluster analysis

View source: R/mt_extra.R

cor_hclR Documentation

Correlation hierarchical cluster analysis

Description

Perform hierarchical cluster analysis based on correlation.

Usage

cor_hcl(
  mat,
  cutoff = 0.75,
  use = "pairwise.complete.obs",
  method = "pearson",
  fig_title = "Cluster Dendrogram",
  size = 3,
  rotate = FALSE
)

Arguments

mat

a data matrix

cutoff

a threshold for correlation analysis.

use

a string giving a method for computing covariances. For details, see stats::cor().

method

method for correlation stats::cor().

fig_title

title for plotting

size

text font size of ggplot2.

rotate

a logical indicating whether to rotate plot.

Value

a list of a ggplot2 object for clustering and a list of cluster centres.

Examples

cor_hcl(mtcars)

wanchanglin/mtExtra documentation built on Aug. 2, 2024, 5:47 p.m.