Learn R Programming

ursa (version 3.10.4)

sort: Sort multiband raster by band names.

Description

Changing order of bands based on sorting of band names.

Usage

# S3 method for ursaRaster
sort(x, decreasing = FALSE, ...)

Value

Object of class ursaRaster

Arguments

x

Object of class ursaRaster

decreasing

Logical. Should the sort be increasing or decreasing? Not available for partial sorting. Default is FALSE.

...

Other arguments, which are passed to S3 method for sorting characters.

Author

Nikita Platonov platonov@sevin.ru

Details

Function sort() for ursaRaster assumes bands reordering based on character band names.

Examples

Run this code
a <- ursa_dummy(nband=7L)
a
sort(a)
sort(a,decreasing=TRUE)

Run the code above in your browser using DataLab