strech: Stretch

Description Usage Arguments Value See Also Examples

Description

Linear strech of values in a Raster object

Usage

1
stretch(x, minv=0, maxv=255, minq=0, maxq=1, filename='', ...) 

Arguments

x

Raster* object

minv

numeric >= 0 and smaller than maxv. lower bound of streched value

maxv

numeric <= 255 and larger than maxv. upper bound of streched value

minq

numeric >= 0 and smaller than maxq. lower quitile bound of original value

maxq

numeric <= 1 and larger than minq. upper quitile bound of original value

filename

character. Filename for the output Raster object (optional)

...

additional arguments as for writeRaster

Value

Raster* object

See Also

stretch argument in plotRGB

Examples

1
2
3
4
5
r <- raster(nc=10, nr=10)
r[] <- 1:100 * 10
stretch(r)
s <- stack(r, r*2)
stretch(s)

raster documentation built on May 19, 2017, 1:13 p.m.

Search within the raster package
Search all R packages, documentation and source code