Learn R Programming

photobiology (version 0.11.3)

setMultipleWl: Set the "multiple.wl" attribute

Description

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.

Arguments

x

a generic_spct object

multiple.wl, value

numeric >= 1 If multiple.wl = NULL, the default, the value is guessed.

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

Run this code
my.spct <- sun.spct
setMultipleWl(my.spct) # default is to search x, here my.spct
getMultipleWl(my.spct)

multiple_wl(my.spct) <- 1L # must be a valid value or NULL!
multiple_wl(my.spct)

multiple_wl(my.spct) <- NULL # must be a valid value or NULL!
multiple_wl(my.spct)

Run the code above in your browser using DataLab