Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

centscaleSpectra2D

Center and Scale a Spectra2D Object Along the Samples Dimension


Description

This function will optionally center, and optionally scale, a Spectra2D object along the samples dimension (i.e. this is pixel-wise scaling in the language of multivariate image analysis). Several scaling options are available.

Usage

centscaleSpectra2D(spectra, center = FALSE, scale = "noscale")

Arguments

spectra

An object of S3 class Spectra2D.

center

Logical. Should the spectra be centered before possibly scaling? Will give an error if center = TRUE and a log function is requested for scaling.

scale

A character string indicating the type of scaling to apply. One of c("autoscale", "Pareto", "log", "log10"). For the log functions, centering is not carried out since logarithm is not defined for negative values.

Value

An object of S3 class Spectra2D.

Author(s)

Bryan A. Hanson, DePauw University.

References

R. Bro and A. K. Smilde "Centering and Scaling in Component Analysis" J. Chemometrics vol. 17 pgs 16-33 (2003).

See Also

normSpectra2D for another means of scaling.

Examples

data(MUD1)
tst <- centscaleSpectra2D(MUD1)

ChemoSpec2D

Exploratory Chemometrics for 2D Spectroscopy

v0.4.187
GPL-3
Authors
Bryan A. Hanson [aut, cre] (<https://orcid.org/0000-0003-3536-8246>)
Initial release
2021-03-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.