m_prcomp: Multiway Principal Component Analysis

View source: R/m_prcomp.R

m_prcompR Documentation

Multiway Principal Component Analysis

Description

'm_prcomp' Performs a multiway principal components analysis on a given two-dimensional chromatograms and returns the results as object of class MPCA. Before to perform the calculation, each given chromatogramas are unfolded to a single dimension. All chromatograms are merged and principal component analysis is performed with the built-in prcomp function. The print method for these objects prints the summary of the analysis. This algorithm was first presented by \insertCiteWold1987RGCxGC.

Usage

m_prcomp(chrom, center = FALSE, scale = FALSE, npcs = 3, ...)

Arguments

chrom

Multiple chromatograms read or batch aligned

center

A logical value indicating whether the variables should be shifted to be zero centered. FALSE is set by default.

scale

a logical value indicating whether the variables should be scaled to have unit variance before the analysis takes place. The default is FALSE.

npcs

an integer indicating how many principals components are desired to maintain. The default is 3 principal components.

...

Other arguments passed to prcomp function.

Value

MPCA returns a list whit class "MPCA" containing the summary of the analysis, the scores matrix, unfolded loadings, and the metadata if it was provided when chromatograms were joined.

References

\insertAllCited

Examples


data(MTBLS579)

# Perform multiway principal component analysis
MTBLS579_mpca <- m_prcomp(MTBLS579, center = TRUE)
# Print MPCA summary
print(MTBLS579_mpca)
# Retrieve MPCA scores
scores(MTBLS579_mpca)
# Plot bidimensional scores
plot_loading(MTBLS579_mpca)



RGCxGC documentation built on Dec. 28, 2022, 3:02 a.m.