pca_kmeans_plot3D: 3D PCA k-means plot (interactive)

Description Usage Arguments Examples

View source: R/pca.R

Description

Groups the points with the clusters given by k-means in a interactive 3D PCA scores plot.

Usage

1
2
3
pca_kmeans_plot3D(dataset, pca.result, num.clusters = 3, 
pcas = c(1, 2, 3), kmeans.result = NULL, labels = FALSE, 
size = 1, ...)

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.

pcas

vector with the principal components to be plotted.

kmeans.result

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

labels

boolean value indicating if the samples' labels will be shown.

size

parameter of plot3d from rgl package.

...

additional parameters of plot3d function from rgl package.

Examples

1
2
3
4
5
6
7
  ### Example of a 3D PCA k-means plot
  library(specmine.datasets)
  data(cachexia)
  pca.result = pca_analysis_dataset(cachexia)
  pca_kmeans_plot3D(cachexia, pca.result, num.clusters = 3, 
    		    pcas = c(1,2,3))
  

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