Compute statistics using cell data in a gt_RasterLayer object.

gt_cellStats(x)

# S4 method for gt_RasterLayer
gt_cellStats(x)

Arguments

x
gt_RasterLayer object.

Value

numeric 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.

Examples

## 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) ## ---------------------------------------------