Learn R Programming

chronosphere (version 0.4.0)

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, ...)

Arguments

x

a RasterArray class object.

stat

A function to be applied.

...

arguments passed to the cellStats function.

Value

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

Examples

Run this code
# NOT RUN {
data(dems)
cellStats(dems, stat=mean, na.rm=TRUE)
# }

Run the code above in your browser using DataLab