ropls.plot: Produce publication-quality ggplot images of ropls objects.

Description Usage Arguments

View source: R/view.R

Description

'ropls.plot“ produces publication-quality ggplot images of ropls objects. The functions automatically determines the model type ("PCA", "PLS", "OPLS","PLS-DA","OPLS-DA") from the ropls object. The components shown in the plot are flexible and determined by the xvar and yvar parameters.

Usage

1
2
ropls.plot(d, plottype = "score", xvar, yvar, hotelling = FALSE,
  ellipse = FALSE, col.var = NULL, col.pca = NULL)

Arguments

d

ropls object created by [opls()].

plottype

Which type of plot to produce. Options include scores (default), loadings and metrics.

xvar

which component to plot on the x-axis. Must refer to a single component ("p1") or orthogonal ("o1") component present in the supplied ropls object.

yvar

which component to plot on the y-axis. Must refer to a single component ("p1") or orthogonal ("o1") component present in the supplied ropls object.

hotelling

If set to TRUE, will add Hotelling's T2 ellipse to the plot.

ellipse

If set to TRUE, will add an ellipse around the groups supplied in the model. Does not work for PCA, PLS and OPLS models.

col.var

Vector of categorical or numerical values used to colour the variables of the loading plot.


JeffreyMolendijk/ml-viewR documentation built on Oct. 30, 2019, 7:37 p.m.