bandnames: Handling names of bands

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/speclib_bandnames.R

Description

Returning and setting names of bands in Speclib

Usage

1
2
bandnames(x)
bandnames(x) <- value

Arguments

x

Object of class Speclib.

value

Character vector of the same length as nbands(x), or NULL.

Value

For bandnames<-, the updated object. Otherwise a vector giving the name of each band in Speclib is returned.

Note

Bandnames are not mandatory in Speclibs. If not set, the default names are in the form V+index of bands.

Author(s)

Lukas Lehnert

See Also

Speclib

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(spectral_data)

## Return band names
bandnames(spectral_data)

## Change band names
bandnames(spectral_data) <- paste("Band", wavelength(spectral_data),
                                  sep = "_")

## Return new band names
bandnames(spectral_data)

hsdar documentation built on Dec. 14, 2017, 5:16 p.m.