kmeans_clustering: Perform k-means clustering analysis

Description Usage Arguments Value Examples

View source: R/clustering.R

Description

Perform k-means clustering analysis on the dataset.

Usage

1
kmeans_clustering(dataset, num.clusters, type = "samples")

Arguments

dataset

list representing the dataset from a metabolomics experiment.

num.clusters

the number of clusters.

type

a string indicating if k-means will be performed on samples ("samples") or on variables ("variables")

Value

An object of class kmeans with the clustering results.

Examples

1
2
3
4
5
  ## Example of kmeans clustering
  library(specmine.datasets)
  data(cachexia)
  kmeans.result = kmeans_clustering(cachexia, 
		  num.clusters = 4, type = "samples")

specmine documentation built on Sept. 21, 2021, 5:06 p.m.