cut: Convert values to classes

Description Usage Arguments Value See Also Examples

Description

Cut uses the base function cut to classify the values of a Raster* object according to which interval they fall in. The intervals are defined by the argument breaks. The leftmost interval corresponds to level one, the next leftmost to level two and so on.

Usage

1
cut(x, ...) 

Arguments

x

A Raster* object

...

additional arguments. See cut

Value

Raster* object

See Also

subs, reclassify, calc

Examples

1
2
3
4
r <- raster(ncols=36, nrows=18)
r[] <- rnorm(ncell(r)) 
breaks <- -2:2 * 3
rc <- cut(r, breaks=breaks)

raster documentation built on Nov. 17, 2017, 5:51 a.m.