wavenumbers: Standard bands

Description Usage Format Details Author(s) Examples

Description

Standard band names with upper and lower limits (wavenumbers)

Usage

1

Format

BAND

factor; band names

UPPER

numeric; upper value

LOWER

numeric; lower value

Details

Standard wavenumbers are required by the read.opus function. Each "SpectraModel" might require different standard bands.

Author(s)

Andrew Sila and Tomislav Hengl

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(m.PHIHOX)
## get bands of interest:
w <- attr(m.PHIHOX@model$opt.coef, "dimnames")[[1]]
nc <- as.numeric(sapply(w, function(x){gsub("[^0-9.]", "", x)}))
rn <- rank(nc)
if(any(duplicated(rn))){ warning("Duplicate bands detected") }
UPPER = c((nc[rn][-length(nc)]+nc[rn][-1])/2, nc[rn][length(nc)]+1)
wns <- data.frame(BAND=w, LOWER=c(nc[rn][1]-1, UPPER[-length(nc)]), UPPER=UPPER)
str(wns)
## compare with:
str(wavenumbers)

soil.spec documentation built on May 2, 2019, 6:08 p.m.