Learn R Programming

specmine (version 3.1.6)

kmeans_plot: Plot kmeans clusters

Description

Plot for each formed cluster, in grey the values of all samples of that cluster and in blue the median of that samples.

Usage

kmeans_plot(dataset, kmeans.result)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

kmeans.result

object of class kmeans with the clustering results.

Examples

Run this code
# NOT RUN {
  ## Example of kmeans plot - dataset filtered for performance purposes
  library(specmine.datasets)
  data(cachexia)
  kmeans.result = kmeans_clustering(cachexia, 
		  num.clusters = 4, type = "samples")
  kmeans_plot(cachexia, kmeans.result)
# }

Run the code above in your browser using DataLab