plot_loading {RGCxGC} | R Documentation |
Plot two-dimensional MPCA loadings
Description
'plot_loading' plot the loading of the a MPCA object.
Usage
plot_loading(Object, type = "n", pc = 1, thresh, ...)
## S4 method for signature 'projected'
plot_loading(Object, type = "b", pc = 1, thresh, ...)
Arguments
Object |
a MPCA object |
type |
the value type of loadings, p for positive, n for negative, and b for negative and positive loading values. |
pc |
the principal component to plot. |
thresh |
numerical value. A threshold to remove low loading values. |
... |
Other parameters passes to |
Details
This function takes the loadings of MPCA and eval if a certain variable was removed previous compute de MPCA and it fills the removed variables with zero. Then, the loadings are plotted considering one principle component at a time as a two-dimensional chromatogram.
Examples
library(colorRamps)
data(MTBLS579)
# MPCA with mean-centered and scaled data
MTBLS579_mpca <- m_prcomp(MTBLS579)
# Negative loadings of the first principal component
plot_loading(MTBLS579_mpca, type = "n", pc = 1,
color.palette = matlab.like)
# Positive loadings of the first principal component
plot_loading(MTBLS579_mpca, type = "p", pc = 1,
color.palette = matlab.like)
[Package RGCxGC version 1.2.0 Index]