plot_loading-methods: Plot two-dimensional MPCA loadings

plot_loadingR 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 filled.contour function.

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)


DanielQuiroz97/RGCxGC documentation built on March 12, 2023, 9:07 a.m.