m_prcomp {RGCxGC}R 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 (Wold et al. 1987).

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

Wold S, Geladi P, Esbensen K, Öhman J (1987). “Multi-way principal components- and PLS-analysis.” Journal of Chemometrics, 1(January 1986), 41–56.

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)



[Package RGCxGC version 1.2.0 Index]