Description Usage Arguments Value Note See Also Examples
These functions are shortcuts to convert other objects into hypeSpec objects.
1 2 3 4 5 6 7 8 9 10 11 12 13 | as.hyperSpec(X, ...)
## S4 method for signature 'matrix'
as.hyperSpec(X, wl = guess.wavelength(colnames(X)), ...)
## S4 method for signature 'data.frame'
as.hyperSpec(
X,
spc = NULL,
wl = guess.wavelength(spc),
labels = attr(X, "labels"),
...
)
|
X |
the object to convert. A matrix is assumed to contain the spectra matrix, a data.frame is assumed to contain extra data. |
... |
additional parameters that should be handed over to |
wl |
wavelength vector. Defaults to guessing from the column names in |
spc |
spectra matrix |
labels |
list with labels |
hyperSpec object
Note that the behaviour of as.hyperSpec (X)
was changed: it now assumes X
to be extra data,
and returns a hyperSpec object with 0 wavelengths. To get the old behaviour
1 2 3 |
Loading required package: lattice
Loading required package: grid
Loading required package: ggplot2
Package hyperSpec, version 0.99-20180627
To get started, try
vignette ("hyperspec")
package?hyperSpec
vignette (package = "hyperSpec")
If you use this package please cite it appropriately.
citation("hyperSpec")
will give you the correct reference.
The project homepage is http://hyperspec.r-forge.r-project.org
[1] "X405" "X405.5" "X406" "X406.5" "X407" "X407.5" "X408" "X408.5"
[9] "X409" "X409.5" "X410"
[1] 405.0 405.5 406.0 406.5 407.0 407.5 408.0 408.5 409.0 409.5 410.0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.