Description Usage Arguments Value Examples
Perform cluster analysis on the dataset.
1 2 | clustering(dataset, method = "hc", distance = "euclidean",
type = "samples", num.clusters = 5, clustMethod = "complete")
|
dataset |
list representing the dataset from a metabolomics experiment. |
method |
a string describing the method of clustering. Possible types are:
|
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". Only for hierarchical clustering. |
type |
a string indicating if cluster analysis will be performed on samples ("samples") or on variables ("variables"). |
num.clusters |
the number of clusters in k-means cluster analysis. |
clustMethod |
Cluster method for hierarchical clustering. |
An object of class kmeans or hclust with the clustering results.
1 2 3 4 5 6 7 | ## Example of kmeans and hierarchical clustering
library(specmine.datasets)
data(cachexia)
hc.result = clustering(cachexia, method = "hc",
distance = "euclidean")
kmeans.result = clustering(cachexia, method = "kmeans",
num.clusters = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.