Learn R Programming

chronosphere (version 0.4.1)

cellStats,RasterArray-method: Statistics across cells in a RasterArray object

Description

The method is inherited from the RasterStack class. Postitions of layers are conserved in the output. (including missing layers)

Usage

# S4 method for RasterArray
cellStats(x, stat, ...)

Value

A set of the values matching the output of stat, organized the same way as the RasterArray.

Arguments

x

a RasterArray class object.

stat

A function to be applied.

...

arguments passed to the cellStats function.

Examples

Run this code
data(dems)
cellStats(dems, stat=mean, na.rm=TRUE)

Run the code above in your browser using DataLab