met.plot_PLS_Imp: Plot PLS important features

met.plot_PLS_ImpR Documentation

Plot PLS important features

Description

met.plot_PLS_Imp visualizes the features' importance in the PLS-DA model.

Usage

met.plot_PLS_Imp(
  mSetObj = NA,
  imgName,
  format = "pdf",
  dpi = NULL,
  width = NA,
  type = "vip",
  feat.nm = c("Comp. 1", "Comp. 2"),
  feat.num = 15,
  color.BW = FALSE,
  plot = TRUE,
  export = TRUE,
  title = FALSE
)

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

("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).

type

(Character) Indicate the variables of importance type to use, "vip" to use VIP scores, or "coef" for coefficients

feat.nm

(Character) Indicate the name of the feature. If type = "vip", choose "Comp. 1", "Comp. 2", etc., depending on the component for which the VIP scores should be shown. If type = "coef", choose "coef.mean" for average coefficients, or the name of a sample group in your dataset.

feat.num

(Numeric) Indicate the number of features to show in the plot.

color.BW

(Logical) TRUE to use black and white, or FALSE to not.

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?

title

(Logical) TRUE to add a title with the used normalization, transformation, and scaling method, or FALSE to not add any title.

Value

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

Author(s)

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

References

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


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