summary-methods: Summary methods

Description Value Note Author(s) Examples

Description

The following summary methods are available:

mean, Median, max, min, range, prod, sum, any, all

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#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 documentation built on May 2, 2019, 5:46 p.m.