Learn R Programming

ursa (version 3.10.4)

nband: Get number of bands of raster image.

Description

nband (length) returns number of bands (layers, if appropriate in terminology) of ursaRaster object.

Usage

nband(x)

# S3 method for ursaRaster length(x)

Value

Positive integer of length 1.

Arguments

x

Object of class ursaRaster

Author

Nikita Platonov platonov@sevin.ru

Details

length for ursaRaster object is a synonym for nband.

See Also

bandname (names for ursaRaster object).

Examples

Run this code
session_grid(NULL)
a1 <- pixelsize()
print(a1)
print(nband(a1))
a2 <- c("Band 1"=a1,Band2=a1/2,sqrt=sqrt(a1),NA)
print(a2)
print(nband(a2))

Run the code above in your browser using DataLab