powered by
Constructor for the Spectra class. Creates a Spectra object from scratch.
Spectra(wl = numeric(), nir = matrix(), id = as.character(NA), units = "nm")
a new "Spectra" object
"Spectra"
a numeric vector giving the wavelengths at with the spectra have been measured
a "matrix" or a "data.frame" object giving the spectra values for each sample
"matrix"
"data.frame"
a vector giving the unique id of each sample in the collection
a character giving the unit in which the wavelengths values are expressed
Pierre Roudier pierre.roudier@gmail.com
spectra, wl, Spectra-class, SpectraDataFrame
spectra
wl
Spectra-class
SpectraDataFrame
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")
Run the code above in your browser using DataLab