Learn R Programming

specmine (version 1.0)

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
  ## Example of kmeans plot - dataset filtered for performance purposes
  data(cassavaPPD)
  cassavaPPD = flat_pattern_filter(cassavaPPD, "iqr", by.percent = TRUE,
	red.value = 70)   
  kmeans.result = kmeans_clustering(cassavaPPD, 3)
  kmeans_plot(cassavaPPD, kmeans.result)

Run the code above in your browser using DataLab