
Last chance! 50% off unlimited learning
Sale ends in
Groups the points with the clusters from k-means in a PCA pairs plot.
pca_pairs_kmeans_plot(dataset, pca.result, num.clusters = 3,
kmeans.result = NULL, pcas = c(1, 2, 3, 4, 5))
list representing the dataset from a metabolomics experiment.
prcomp object with the PCA results.
number of clusters of k-means.
result from k-means. If null k-means is performed in the function.
vector with the principal components to be plotted.
# 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