Function to set by reference the multiple.wl
attribute of an existing
generic_spct
object or an object of a class derived from
generic_spct
.
Usage
setMultipleWl(x, multiple.wl = NULL)
multiple_wl(x) <- value
Value
x
, modified in place by reference. If x is not a
generic_spct
or an object of a class derived from
generic_spct
, x
is not modified.
Details
These methods set the attribute multiple.wl
and if the
argument of multiple.wl
or value
is NULL
, they call
findMultipleWl
to obtain a guess. Pathological cases where
multiple spectra in long form do not share any wavelength value underestimate
the number of spectra, and require an explicit numeric argument. Calling
these methods is very rarely needed in user code.
See also
Other multiple.wl attribute functions:
getMultipleWl()
Examples
my.spct <- sun.spct
setMultipleWl(my.spct) # default is to search x, here my.spct
getMultipleWl(my.spct)
#> [1] 1
multiple_wl(my.spct) <- 1L # must be a valid value or NULL!
multiple_wl(my.spct)
#> [1] 1
multiple_wl(my.spct) <- NULL # must be a valid value or NULL!
multiple_wl(my.spct)
#> [1] 1