plot_loading | R Documentation |
'plot_loading' plot the loading of the a MPCA object.
plot_loading(Object, type = "n", pc = 1, thresh, ...) ## S4 method for signature 'projected' plot_loading(Object, type = "b", pc = 1, thresh, ...)
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 |
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.