Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Summary-methods

Summary methods


Description

The following summary methods are available: mean, Median, max, min, range, prod, sum, any, all

Usage

## S4 method for signature 'TransitionStack'
Summary(x, ..., na.rm = FALSE)

Arguments

x

objects

...

further arguments passes to or from methods

na.rm

logical, should missing values be removed?

Value

a TransitionLayer

Note

These methods compute a summary statistic based on cell values of layers in a TransitionStack. The result of these methods is always a single TransitionLayer.

Author(s)

Jacob van Etten

Examples

#Create a new raster and set all its values to unity.
raster <- raster(nrows=18, ncols=36) 
raster <- setValues(raster,rep(1,ncell(raster)))

#Create a Transition object from the raster
tr <- transition(raster,mean,4)

trS <- stack(tr, tr*2)

#Apply a Summary method
trSum <- sum(trS)

#plot(raster(trMean))

gdistance

Distances and Routes on Geographical Grids

v1.3-6
GPL (>= 2)
Authors
Jacob van Etten [aut] (<https://orcid.org/0000-0001-7554-2558>), Kauê de Sousa [cre, ctb] (<https://orcid.org/0000-0002-7571-7845>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.