Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

readSLI

Read ENVI spectral libraries


Description

read/write support for ENVI spectral libraries

Usage

readSLI(path)

Arguments

path

Path to spectral library file with ending .sli.

Details

ENVI spectral libraries consist of a binary data file (.sli) and a corresponding header (.hdr, or .sli.hdr) file.

Value

The spectral libraries are read into a data.frame. The first column contains the wavelengths and the remaining columns contain the spectra.

See Also

Examples

## Example data
sliFile <- system.file("external/vegSpec.sli", package="RStoolbox")
sliTmpFile <- paste0(tempdir(),"/vegetationSpectra.sli") 

## Read spectral library
sli <- readSLI(sliFile)
head(sli)
plot(sli[,1:2], col = "orange", type = "l")
lines(sli[,c(1,3)], col = "green")
 
## Write to binary spectral library
writeSLI(sli, path = sliTmpFile)

RStoolbox

Tools for Remote Sensing Data Analysis

v0.2.6
GPL (>= 3)
Authors
Benjamin Leutner [cre, aut], Ned Horning [aut], Jakob Schwalb-Willmann [aut], Robert J. Hijmans [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.