vegindex(x, index, returnHCR = "auto", L = 0.5,
weighted = TRUE, ...)SpeclibFALSE the reflectance values of nearest neighbour to passed position are returned. See If function is called without any arguments, return value will be a vector containing all available indices in alphabetical order.
* For references please type: hsdardocs("References.pdf").
** For GDVI n must be defined appending an underscore and the intended exponent to the index name. E.g., for n = 2, the correct index name would be "GDVI_2". Note that GDVI-indices with n = {2, 3, 4} will be derived if all available indices are calculated.
}
hsdardocs("References.pdf")soilindex, derivative.speclib, rededge, get_reflectance## Example calculating NDVI
data(spectral_data)
ndvi <- vegindex(spectral_data, "NDVI")
## Example calculating all available indices
## Get available indices
avl <- vegindex()
vi <- vegindex(spectral_data, avl)
## Self-defined indices
## NDVI
vi <- vegindex(spectral_data, "(R800-R680)/(R800+R680)")
## NDNI
vi <- vegindex(spectral_data,
"(log(1/R1510) - log(1/R1680))/(log(1/R1510) + log(1/R1680))")
## D1
vi <- vegindex(spectral_data, "D730/D706")Run the code above in your browser using DataLab