reconstructSp: [+] Reconstruct spectra from loadings and scores (i.e....

View source: R/reconstructSp.R

reconstructSpR Documentation

[+] Reconstruct spectra from loadings and scores (i.e. components and amplitudes)

Description

Reconstruct spectra from loadings and scores (i.e. from spectroscopic components and their amplitudes).

Usage

reconstructSp(loadings, scores, sp = NULL)

Arguments

loadings

Components' spectra (loadings) as either a matrix or a hyperSpec object.

scores

Components' amplitudes (scores) as either a matrix or a hyperSpec object.

sp

hyperSpec object which has the same number or rows as scores. If sp is provided, reconstructed spectra will replace other spectroscopic data in sp. This object will be returned as a result of this function.

Value

Reconstruction of the original spectroscopic data matrix, based on scores and loadings as either a matrix or hyperSpec object.
reconstructed <- scores %*% loadings

Author(s)

Vilmantas Gegzna

See Also

reconstruct in ChemometricsWithR,
project in ChemometricsWithR,
reconstruct in Rssa

Other component analysis / factorisation related functions in spHelper: getScores(), infoDim(), plot_spDiff(), qplot_infoDim(), qplot_kAmp(), qplot_kSp(), qplot_spc(), sortLoadings(), unipeak(), whichOutlier()

Examples

reconstructSp(Loadings2, Scores2)
reconstructSp(Loadings2, Scores2, Spectra2)


GegznaV/spHelper documentation built on April 16, 2023, 1:42 p.m.