rRange: Rescale the range of values of a raster

Description Usage Arguments Value See Also Examples

View source: R/modify.operators.R

Description

Rescale the range of values of a raster

Usage

1
rRange(obj, range = NULL)

Arguments

obj

[RasterLayer(1)]
The object to modify.

range

[integer(2)]
vector of minimum and maximum value to which the values will be scaled.

Value

A RasterLayer of the same dimension as obj, where the cell values have been rescaled.

See Also

Other operators to modify cell values: rBinarise, rCategorise, rDistance, rFillNA, rOffset, rPermute, rSubstitute

Examples

1
2
3
input <- rtRasters$continuous
scaled <- rRange(input, range = c(0, 25))
visualise(raster::stack(input, scaled))

EhrmannS/rasterTools documentation built on Sept. 4, 2019, 10:34 a.m.