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

Spectra

Spectra Objects


Description

In ChemoSpec, spectral data sets are stored in an S3 class called Spectra, which contains a variety of information in addition to the spectra themselves. Spectra objects are created by files2SpectraObject or matrix2SpectraObject.

Structure

The structure of a Spectra object is a list of 9 elements and an attribute as follows:

element type description
$freq num A common frequency (or wavelength) axis for all the spectra.
$data num The intensities for the spectra. A matrix of dimension
no. samples x no. frequency points.
$names chr The sample names for the spectra; length must be no. samples.
$groups Factor The group classification of the samples; length must be no. samples.
$colors chr The colors for each sample; length must be no. samples.
Groups and colors correspond.
$sym integer As for colors, but symbols for plotting (if b/w is desired).
$alt.sym chr Lower-case letters as alternate symbols for plotting.
$unit chr Two entries, the first giving the x axis unit, the second the y axis unit.
$desc chr A character string describing the data set. This appears on plots and therefore
should probably be kept to 40 characters or less.
- attr chr "Spectra" The S3 class designation.

Author(s)

Bryan A. Hanson, DePauw University.

See Also

sumSpectra to summarize a Spectra object. sumGroups to summarize group membership of a Spectra object. chkSpectra to verify the integrity of a Spectra object. colorSymbol for a discussion of color options. Finally, additional documentation at https://bryanhanson.github.io/ChemoSpec/


ChemoSpec

Exploratory Chemometrics for Spectroscopy

v5.3.11
GPL-3
Authors
Bryan A. Hanson [aut, cre] (<https://orcid.org/0000-0003-3536-8246>), Mike Bostock [cph, ctb] (author of the d3.js library used by plotSpectraJS, http://d3js.org), Matt Keinsley [ctb] (author of initial AOV-PCA code)
Initial release
2021-03-24

We don't support your browser anymore

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