Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


specmine (version 3.1.6)

pca_pairs_kmeans_plot: PCA k-means pairs plot

Description

Groups the points with the clusters from k-means in a PCA pairs plot.

Usage

pca_pairs_kmeans_plot(dataset, pca.result, num.clusters = 3, 
kmeans.result = NULL, pcas = c(1, 2, 3, 4, 5))

Arguments

dataset

list representing the dataset from a metabolomics experiment.

pca.result

prcomp object with the PCA results.

num.clusters

number of clusters of k-means.

kmeans.result

result from k-means. If null k-means is performed in the function.

pcas

vector with the principal components to be plotted.

Examples

Run this code
# NOT RUN {
  ## Example of a PCA k-means pairs plot
  library(specmine.datasets)
  data(cachexia)
  pca.result = pca_analysis_dataset(cachexia)
  kmeans.res = kmeans_clustering(cachexia, 3)
  pca_pairs_kmeans_plot(cachexia, pca.result, num.clusters = 3, 
  			kmeans.result = kmeans.res, pcas = c(1,2,3,4,5))
# }

Run the code above in your browser using DataLab