Learn R Programming

AnalysisLin (version 0.1.2)

corr_cluster: Correlation Clustering

Description

This function performs hierarchical clustering on a correlation matrix, providing insights into the relationships between variables. It generates a dendrogram visualizing the hierarchical clustering of variables based on their correlation patterns.

Usage

corr_cluster(data, type = "pearson", method = "complete", hclust_method = NULL)

Value

A dendrogram visualizing the hierarchical clustering of variables based on the correlation matrix.

Arguments

data

Input data frame.

type

The type of correlation to be computed. It can be "pearson", "kendall", or "spearman".

method

The method for hierarchical clustering. It can be "complete", "single", "average", "ward.D", "ward.D2", "mcquitty", "median", or "centroid".

hclust_method

The hierarchical clustering method. It can be "complete", "single", "average", "ward.D", "ward.D2", "mcquitty", "median", or "centroid".

Examples

Run this code
data(mtcars)
corr_cluster(data = mtcars, type = 'pearson', method = 'complete')

Run the code above in your browser using DataLab