Learn R Programming

specmine (version 1.0)

pca_plot_3d: 3D pca plot

Description

3D plot from 3 components

Usage

pca_plot_3d(dataset, model, var.class, pcas = 1:3, colors = NULL, legend.place = "topright", ...)

Arguments

dataset
list representing the dataset from a metabolomics experiment.
model
model with pca scores (pls model).
var.class
metadata column class.
pcas
the components to be plotted.
colors
colors of the groups.
legend.place
legend place.
...
additional parameters to legend function.

Examples

Run this code
## Not run: 
#   ## Example of a 3d pca plot
#   data(cachexia)
#   train.result = train_models_performance(cachexia, "pls", 
# 	"Muscle.loss", "cv")
#   pca_plot_3d(cachexia, train.result$final.models$pls, "Muscle.loss")
# ## End(Not run)

Run the code above in your browser using DataLab