Description Usage Arguments Value Note
View source: R/spectral_indices.r
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.
1 2 | get_band_of_wavelength(spec_df, wavelengths_in_nm = NULL,
wavelength_range = NULL, band_txt = "X", splitter = "[X.]", i = 2)
|
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. |
the column or rasterlayer with measurements in the chosen wavelength
TO DO: adapt to keep decimals in wavelength value written in layer name
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.