Learn R Programming

specmine (version 1.0)

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 (computationally heavy)
#   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))
# ## End(Not run)

Run the code above in your browser using DataLab