pca_pairs_kmeans_plot: PCA k-means pairs plot

Description Usage Arguments Examples

View source: R/pca.R

Description

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

Usage

1
2
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

1
2
3
4
5
6
7
  ## 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))

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