get_band_of_wavelength: Get The Measurements Made In A Chosen Wavelength

Description Usage Arguments Value Note

View source: R/spectral_indices.r

Description

Extract from a dataframe where columns are measurements in individual wavelengths, and named following Quantalab's convention, the data that are closest to a chosen wavelegth.

Usage

1
2
get_band_of_wavelength(spec_df, wavelengths_in_nm = NULL,
  wavelength_range = NULL, band_txt = "X", splitter = "[X.]", i = 2)

Arguments

spec_df

Dataframe or RasterBrick of spectral measurements, with a column per band/spectral wavelength, and columns (layers if spec_df is RasterBrick) named following Quantalab's convention.

wavelengths_in_nm

Numeric vector. The wavelength(s) of interest, in nm. Defualt is NULL

wavelength_range

Numeric vector of length 2. Instead of requesting observations (columns or rasterlayers) for specific wavelengths (through wavelengths_in_nm ), one can requests all observations falling in a specific wavelength range to be returned in a given range. Default is NULL

band_txt

Character. A piece of text that only occurs in columns/layers that have radiance/reflectance values. Default is "X"

splitter

character. The character that can be used in strpslit to isolate the wavelength value. Default is "[X.]"

i

The position of the wavelength value after the stringsplit operation.

Value

the column or rasterlayer with measurements in the chosen wavelength

Note

TO DO: adapt to keep decimals in wavelength value written in layer name


pieterbeck/CanHeMonR documentation built on May 25, 2019, 7:11 a.m.