met.plot_PLSImpScatter
visualizes the features' importance in the PLS-DA model by comparing VIP scores and coefficients.
Usage
met.plot_PLSImpScatter(
mSetObj,
imgName = "PLS_ImpScatter",
format = "png",
dpi = 300,
width = NA,
feat.nm = "coef.mean",
vip.nm = c("Comp. 1", "Comp. 2"),
plot = TRUE,
export = FALSE,
vip.thresh = 1,
show.title = FALSE,
title
)
Arguments
- mSetObj
Input name of the created mSet object, Data container after partial least squares-discriminant analysis (
met.PLSR.Anal
andmet.PLSDA.CV
).- imgName
(Character) Enter a name for the image file (if
export = TRUE
).- format
(
"png"
or"pdf"
) image file format (ifexport = TRUE
).- dpi
(Numeric) resolution of the image file (if
export = TRUE
). IfNULL
, 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
).- feat.nm
(Character) Indicate the name of the feature. Choose
"coef.mean"
for average coefficients, or the name of a sample group in your dataset.- vip.nm
(Character or a character vector) Choose
"Comp. 1"
,"Comp. 2"
, etc., depending on the component for which the VIP scores should be shown. If more than one component are specified (the default isc("Comp. 1", "Comp. 2")
), an average VIP score is calculated.- plot
(Logical,
TRUE
orFALSE
) Shall the plot be returned in the RStudio 'Plots' pane?- export
(Logical,
TRUE
orFALSE
) Shall the plot be exported as PDF or PNG file?- vip.thresh
(Numeric) Draw a vertical line in the plot indicating a chosen VIP relevance threshold (the default is
1
).- show.title
(Logical)
TRUE
to add a title to the plot, orFALSE
to not.- title
(Character) Define the title if
show.title = TRUE
Value
The input mSet object with added scatter plot. The plot can be retrieved from within R via print(mSetObj$imgSet$pls.ImpScatter_plot_feat.nm_.plot)
.
Author
Nicolas T. Wirth mail.nicowirth@gmail.com Technical University of Denmark License: GNU GPL (>= 2)