bands

0th

Percentile

Bands

A 'band' refers to a single layer for a possibly multi-layer file. Most RasterLayer objects will refer to files with a single band. (The term 'band' is frequently used in remote sensing to refer to a variable (layer) in a multi-variable dataset and in that context bands could be stored in a single or in seperate files). nbands returns the number of bands of the file a RasterLayer points to (and 1 if it does not point at any file) band returns the specific band the RasterLayer refers to (1 if the RasterLayer points at single layer file or does not point at any file).

Keywords
spatial
Usage
band(x, ...)
nbands(x)
Arguments
x
RasterLayer object
...
Additional arguments (none at this time)
Value

  • a numeric value >= 1

See Also

nlayers

Aliases
  • band
  • band,RasterLayer-method
  • nbands
Examples
r <- raster()
nbands(r)
band(r)
Documentation reproduced from package raster, version 1.0.0-1, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.