Learn R Programming

RGCxGC (version 1.2.0)

plot_loading: 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 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

Run this code

library(colorRamps)
data(MTBLS579)
# MPCA with mean-centered and scaled data
MTBLS579_mpca <- m_prcomp(MTBLS579)
# Negative loadings of the first principal component
# \donttest{
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)
# }

Run the code above in your browser using DataLab