Description Usage Arguments Details Value Author(s) See Also Examples
Note that wl2i
generates sequences of indices along the wavelength axis.
1 2 |
x |
the hyperSpec object |
from,to |
arguments handed to |
... |
arguments for |
index |
should a vector with indices be returned rather than a hyperSpec object? |
seq
had to be implemented as S3 method as the generic has only ... arguments (on which
no dispatch with differing types is possible).
seq_along
is not generic, but returns a sequence of the length
of the
object. As hyperSpec provides a Method length
, it can be used. The result is a
sequence of indices for the spectra.
a numeric or hyperSpec object, depending on index
.
C. Beleites
wl2i
to construct sequences of wavelength indices.
1 2 3 4 5 6 7 8 | seq (flu, index = TRUE)
seq_along (flu)
seq (flu, length.out = 3, index = TRUE) # return value is numeric, not integer!
seq (flu, by = 2, index = TRUE) # return value is numeric, not integer!
plot (flu, col = "darkgray")
plot (seq (flu, by = 2), add = TRUE, col= "red")
plot (seq (flu, length.out = 2), add = TRUE, col= "blue")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.