Learn R Programming

hsdar (version 0.5.1)

get_reflectance: Get reflectance values

Description

Returns weighted or unweighted reflectance values at wavelength position.

Usage

"get_reflectance"(spectra, wavelength, position, weighted = FALSE, ...)

Arguments

spectra
Object of class Speclib or data.frame with reflectance values.
wavelength
Vector with wavelength values.
position
Numeric value passing the position of reflectance values to be returned in dimensions of the wavelength values.
weighted
Logical indicating if reflectance values should be interpolated to fit wavelength position. If FALSE the reflectance values of nearest neighbour to passed position are returned.
...
Arguments to be passed to specific functions. For get_reflectance.default ignored.

Value

A vector with reflectance values for each spectrum is returned. If position falls outside of spectral range of input values, NA values are returned.

See Also

spectra

Examples

Run this code
data(spectral_data)

Run the code above in your browser using DataLab