Description Usage Arguments Details Value Author(s) See Also Examples
Either retrieves the wavelengths from a Spectra*
object, or creates a Spectra*
object from a "data.frame"
object by setting some of its columns as the wavelengths.
1 2 |
object |
a |
value |
the wavelengths of the |
... |
Ignored |
When applied to a Spectra*
object, this functions simply returns the wavelengths of the spectra it is storing.
If applied on a "data.frame"
object, it is an helper function to create a Spectra*
object. It then needs to be indicated the wavelengths at which the spectra values are measured. The assumption is that each row of the "data.frame"
is a spectra, and the column names of the "data.frame"
contain the wavelengths values.
If all the columns are used to create the Spectra*
object, a Spectra
object is created. If some attributes are left, they will be used to generate a SpectraDataFrame
object.
If applied on a "data.frame"
, either a Spectra
or a SpectraDataFrame
object. If applied on a Spectra*
object, a vector.
Pierre Roudier pierre.roudier@gmail.com
spectra
, Spectra-class
, SpectraDataFrame-class
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Loading example data
data(australia)
spectra(australia) <- sr_no ~ ... ~ 350:2500
# Retrieving wavelengths from Spectra* object
wl(australia)
# Replacing wavelength values - USE WITH CAUTION!
wl(australia) <- 1:length(australia)
wl(australia)
# Use to initiate a Spectra* object from a data.frame
data(australia)
wl(australia) <- 350:2500
ids(australia) <- ~ sr_no
summary(australia)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.