Summary-methods | R Documentation |
The following summary methods are available: mean, Median, max, min, range, prod, sum, any, all
## S4 method for signature 'TransitionStack'
Summary(x, ..., na.rm = FALSE)
x |
objects |
... |
further arguments passes to or from methods |
na.rm |
logical, should missing values be removed? |
a TransitionLayer
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.
Jacob van Etten
#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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.