spc.identify {hyperSpec} | R Documentation |
This function allows to identify the spectrum and the wavelength of a
point in a plot produced by plotspc
.
spc.identify(x, y = NULL, wavelengths = NULL, ispc = NULL, ...)
x |
either the abscissa coordinates or the list returned by
plotspc |
y |
the ordinate values. Giving y will override any values
from x$y . |
wavelengths |
the wavelengths for the data points. Giving
wavelengths will override any values from
x$wavelengths . |
ispc |
if a selection of spectra was plotted, their indices can
be given in ispc . In this case ispc [i] is returned
rather than i . |
... |
passed to identify |
The function uses identify
to identify the
points clicked at with the left button and converts them into a more
convenient format.
a data.frame
with columns
i |
spectra indices of the identified points, i.e. the rows of
the hyperSpec object that was plotted.
If ispc is given, ispc [i] is returned rather than
i .
|
wavelengths |
the wavelengths of the identified points |
C. Beleites
## Not run: ispc <- sample (nrow (laser), 10) ispc identified <- spc.identify (plotspc (laser[ispc])) ## convert to the "real" spectra indices ispc [identified$i] identified$wavelength spc.identify (plotspc (laser[ispc]), ispc = ispc) ## End(Not run)