Learn R Programming

visa (version 1.0.0)

sr: Calculate Simple Ratio (SR).

Description

Simple Ratio is the ratio of the spectra (mostly reflectance) between two bands in the format of $$SR = \lambda_i/\lambda_j$$

Usage

sr(s, b1, b2)

lm.sr(s, b1, b2, y)

Value

sr

Returns a simple ratio index.

p

Returns a ggplot object.

Arguments

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.

y

A numeric variable to correlate with SR

Details

Simple ratio and NDVI looking indices are the two groups of mostly used spectral indices in remote sensing.

Examples

Run this code
library(visa)
s <- NSpec.DF$spectra
sr1 <- sr(s, 480, 550)

s <- NSpec.DF
y <- NSpec.DF$N
lm.sr(s,600,500,y)

Run the code above in your browser using DataLab