sr: Calculate Simple Ratio (SR).

View source: R/sr.R

srR Documentation

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)

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.

Value

sr

Returns a simple ratio index.

p

Returns a ggplot object.

Examples

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

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


visa documentation built on April 4, 2025, 5:40 a.m.