pairwise_indices: Pairwise indices

View source: R/conversion.R

pairwise_indicesR Documentation

Pairwise indices

Description

pairwise_indices computes pairwise spectral indices. Indices are computed as (a - b) / (a + b) where a is the lower band. The column names of the resulting matrix are given as "a|b".

Usage

pairwise_indices(x, max_out_elements = 5e+08)

Arguments

x

spectra

max_out_elements

maximum number of elements in the output object

Value

list that includes the *indices* between bands a and b (column names a|b) and the pairwise *band_combinations*

Author(s)

Jose Eduardo Meireles

Examples

library(spectrolab)
spec  = as_spectra(spec_matrix_example, name_idx = 1)

# Resampling spectra since a spectral dataset with 2,001 bands
# results in 2,001,000 unique spectral indices per sample
spec  = resample(spec, seq(400, 2400, 2))
p_idx = pairwise_indices(spec)


annakat/spectrolab documentation built on Oct. 14, 2023, 1:16 a.m.