as.rspec | R Documentation |
Converts data frames or matrices containing spectral data to rspec
object
as.rspec(
object,
whichwl = NULL,
interp = TRUE,
lim = NULL,
exceed.range = TRUE
)
is.rspec(object)
object |
(required) a data frame or matrix containing spectra to process. |
whichwl |
a numeric or character vector specifying which column contains
wavelengths. If |
interp |
whether to interpolate wavelengths in 1-nm bins (defaults to
|
lim |
vector specifying wavelength range to interpolate over (e.g.
|
exceed.range |
logical. Should data be interpolated to the limits
specified by |
an object of class rspec
for use in further pavo
functions
a logical value indicating whether the object is of class rspec
Chad Eliason cme16@zips.uakron.edu
# Generate some fake reflectance data
fakedat <- data.frame(wl = 300:700, refl1 = rnorm(401), refl2 = rnorm(401))
head(fakedat)
# Determine if is rspec object
is.rspec(fakedat)
# Convert to rspec object
fakedat2 <- as.rspec(fakedat)
is.rspec(fakedat2)
head(fakedat2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.