Learn R Programming

specmine (version 3.1.6)

hierarchical_clustering: Perform hierarchical clustering analysis

Description

Perform hierarchical clustering analysis on the dataset.

Usage

hierarchical_clustering(dataset, distance = "euclidean", 
clustMethod = "complete", hc.type = "samples")

Arguments

dataset

list representing the dataset from a metabolomics experiment.

distance

the distance measure to be used to compute the distances between the rows of a data matrix. Possible types are "euclidean", "manhattan", "pearson" or "spearman".

clustMethod

the agglomeration method to be used. Possible values are "ward", "single", "complete", "average", "mcquitty", "median" or "centroid".

hc.type

a string indicating if hierarchical cluster analysis will be performed on samples ("samples") or on variables ("variables")

Value

An object of class hclust with the clustering results.

Examples

Run this code
# NOT RUN {
  ## Example of hierarchical clustering
  library(specmine.datasets)
  data(cachexia)
  hc.result = hierarchical_clustering(cachexia, 
	      distance = "euclidean", clustMethod = "complete", 
	      hc.type = "samples")
# }

Run the code above in your browser using DataLab