Learn R Programming

phytoclass (version 2.3.1)

Cluster: Cluster things

Description

Cluster things

Usage

Cluster(
  Data,
  minSamplesPerCluster,
  row_ids = NULL,
  dist_method = "euclidean",
  hclust_method = "ward.D2"
)

Value

A named list of length two. The first element "cluster.list" is a list of clusters, and the second element "cluster.plot" the cluster analysis object (dendogram) that can be plotted.

Arguments

Data

S (sample) matrix

minSamplesPerCluster

the minimum number of samples required for a cluster

row_ids

A vector of custom row names to be added to dendrogram

dist_method

Distance metric to be used in stats::dist. This should be one of "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski".

hclust_method

Cluster method to be used in stats::hclust. This should be one of "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC).

Examples

Run this code
Cluster.result <- Cluster(Sm, 14)
Cluster.result$cluster.list
plot(Cluster.result$cluster.plot)

Run the code above in your browser using DataLab