Usage
spc.identify(x, y = NULL, wavelengths = NULL,
ispc = NULL, tol.wl = diff(range(x))/200,
tol.spc = diff(range(y))/50, point.fn = spc.point.max,
formatter = spc.label.default, ..., cex = 0.7,
adj = c(0, 0.5), srt = 90, warn = TRUE) spc.point.max(wl, spc, wlclick)
spc.point.default(wl, spc, wlclick)
spc.point.min(wl, spc, wlclick)
spc.point.sqr(wl, spc, wlclick, delta = 1L)
spc.label.default(ispc, wl, spc, digits = 3)
spc.label.wlonly(ispc, wl, spc, digits = 3)
Arguments
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
.
tol.wl,tol.spc
tolerance in wavelength and
spectral intensity to search around the clicked point.
See details.
point.fn
function (wl, spc, wlclick)
to
determine the actual point to label, see details.
formatter
function (i, wl, spc)
that
produces the labels. If NULL
, no labels are
displayed.
...
passed to text
in
order to produce the labels warn
Should the user be warned if no point is in
the considered window? In addition, see the discussion of
option debuglevel
in the details. If FALSE
, the resulting data.frame will have a row
of NA
s instead.
delta
spc.point.sqr
fits the parabola in
the window wlclick $\pm$ delta points.
wl
the wavelength to label
spc
the intensity to label
wlclick
the clicked wavelength
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
.
digits
how many digits of the wavelength should be
displayed?