met.plot_PLS2DScore: Create 2D PLS-DA score plot

met.plot_PLS2DScoreR Documentation

Create 2D PLS-DA score plot

Description

met.plot_PLS2DScore visualizes clusters of samples based on their similarity in partial least squares-discriminant analysis.

Usage

met.plot_PLS2DScore(
  mSetObj = NA,
  imgName = "PLSDA_2DScore",
  format = "pdf",
  dpi = NULL,
  width = NA,
  inx1 = 1,
  inx2 = 2,
  reg = 0.95,
  show = 1,
  grey.scale = 0,
  subtitle = FALSE,
  use.sparse = FALSE,
  plot = TRUE,
  export = TRUE
)

Arguments

mSetObj

Input name of the created mSet object, Data container after partial least squares-discriminant analysis (met.PLSR.Anal and met.PLSDA.CV).

imgName

(Character) Enter a name for the image file (if export = TRUE).

format

(Character, "png" or "pdf") image file format (if export = TRUE).

dpi

(Numeric) resolution of the image file (if export = TRUE). If NULL, the resolution will be chosen automatically based on the chosen file format (300 dpi for PNG, 72 dpi for PDF)

width

(Numeric) width of the the image file in inches (if export = TRUE).

inx1

(Numeric) Indicate the number of the principal component for the x-axis of the loading plot.

inx2

(Numeric) Indicate the number of the principal component for the y-axis of the loading plot.

reg

(Numeric) Enter a number between 0 and 1, 0.95 will display the 95 percent confidence regions, and 0 will not.

show

Display sample names, 1 = show names, 0 = do not show names.

grey.scale

Use grey-scale colors, 1 = grey-scale, 0 = not grey-scale.

subtitle

(Logical, TRUE or FALSE) Shall the applied data transformation and scaling methods be displayed below the plot title?

use.sparse

(Logical) Use a sparse algorithm (TRUE) or not (FALSE).

plot

(Logical, TRUE or FALSE) Shall the plot be returned in the RStudio 'Plots' pane?

export

(Logical, TRUE or FALSE) Shall the plot be exported as PDF or PNG file?

Value

The input mSet object with added scatter plot. The plot can be retrieved from within R via print(mSetObj$imgSet$pls.score2d_PCx_PCy.plot).

Author(s)

Nicolas T. Wirth mail.nicowirth@gmail.com Technical University of Denmark License: GNU GPL (>= 2)

References

adapted from PlotPLS2DScore (https://github.com/xia-lab/MetaboAnalystR).


NicWir/VisomX documentation built on Dec. 8, 2024, 1:27 a.m.