Learn R Programming

visa (version 1.0.0)

nsr: Calculate Normalized Simple Ratio (NSR) index.

Description

It is a normalization of SR by doing NSR = (1-SR)/(1+SR), with the same two spectral bands.

Usage

nsr(s, b1, b2)

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

Value

nsr

Returns a NSR 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

As it exactly reads in its name, it is a normalization of the SR and ranges in (0,1).

Examples

Run this code
s <- NSpec.DF$spectra
nsr1 <- nsr(s, 480, 550)

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

Run the code above in your browser using DataLab