| ndvi2 | R Documentation | 
This function calculates a 2-band NDVI using the nsr function.
ndvi2(s, b1, b2)
s | 
 Spectral data in the format of visa's Spectra object, spectra.dataframe or spectra.matrix.  | 
b1 | 
 A integer number which defines the wavelength of the 1st spectral band.  | 
b2 | 
 A integer number which defines the wavelength of the 2nd spectral band.  | 
Calculate a NDVI with two specific bands of choice. The new NDVI follows the the standard formula
NDVI = (\lambda_i + \lambda_j)/(\lambda_i - \lambda_j)
. Bands i and j correspond to the b1 and b2 input arguments, respectively. Wavelength indexes are determined based on the first argument 's'.
ndvi | 
 The returned values are the new NDVI.  | 
library(visa)
s <- NSpec.DF$spectra
ndvi2(s, 780, 680)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.