Description Objects from the Class Slots Author(s) Examples
The specstore package provides the user with two S4 classes that have been developped to store and manipulate spectroscopy data.
The Spectra
class is storing the spectra matrix, along with the wavelengths at which those have been measured, the units in whioch those wavelengths are expressed, and a unique id for each sample in the collection.
The SpectraDataFrame
classe is extending the Spectra
class by giving the opportunity to store attribute data along with the spectra - this is mostly the case when we want to predict physical or chemical properties from the spectra set.
Common generic methods implemented for these classes include:
summary
, show
, nrow
, length
, plot, ...
, [
, [[
, $
.
Objects can be created by calls of the form new("Spectra", ...)
, with the constructor functions like Spectra(...)
, or with the helper functions such as wl
and spectra
.
Slots for Spectra* objects
wl
:object of class "numeric"
; the wavelengths at which the spectra has been measured
nir
:object of class "matrix"
; the spectra, with as many columns as wavelengths, and as many rows as samples
id
:object of class "data.frame"
with one attribute; the identification strings for each sample in the collection
units
:object of class "character"
; units in which the wavelengths are expressed
data
:object of class "data.frame"
containing the attribute data
Pierre Roudier pierre.roudier@gmail.com
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.