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

Spectra

Constructor for the Spectra class.


Description

Constructor for the Spectra class. Creates a Spectra object from scratch.

Usage

Spectra(wl = numeric(), nir = matrix(), id = as.character(NA), units = "nm")

Arguments

wl

a numeric vector giving the wavelengths at with the spectra have been measured

nir

a "matrix" or a "data.frame" object giving the spectra values for each sample

id

a vector giving the unique id of each sample in the collection

units

a character giving the unit in which the wavelengths values are expressed

Value

a new "Spectra" object

Author(s)

Pierre Roudier pierre.roudier@gmail.com

See Also

spectra, wl, Spectra-class, SpectraDataFrame

Examples

wls <- 350:2500
  id <- c("A", "B")
  nir <- matrix(runif(2*length(wls)), nrow = 2)
  s <- Spectra(wl = wls, nir = nir, id = id, units = "nm")

spectacles

Storing, Manipulating and Analysis Spectroscopy and Associated Data

v0.5-3
GPL-3
Authors
Pierre Roudier [aut, cre], Max Kuhn [ctb], Kristian Hovde Liland [ctb], Bjorn-Helge Mevik [ctb], Hadley Wickham [ctb], Raphael Viscarra Rossel [dtc]
Initial release
2021-01-11

We don't support your browser anymore

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