gt_cellStats: Statistics across cells

Description Usage Arguments Details Value Examples

Description

Compute statistics using cell data in a gt_RasterLayer object.

Usage

1
2
3
4
gt_cellStats(x)

## S4 method for signature 'gt_RasterLayer'
gt_cellStats(x)

Arguments

x

gt_RasterLayer object.

Details

This function calculates the mean, median, mode, standard deviation, minimum, and maximum of the values in a raster. This function is similar to cellStats.

Value

numeric object.

Examples

1
2
3
4
5
6
7
## Not run: 
g <- gt_raster(raster::raster(matrix(c(1:6), ncol=3),
                              crs=sp::CRS('+init=epsg:4326'),
                              xmn=0, xmx=3, ymn=2, ymx=10))
gt_cellStats(g)

## End(Not run)

jeffreyhanson/geotrellis documentation built on May 19, 2019, 4 a.m.