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

Transition-extract-replace

Extracting and replacing: class Transition


Description

Methods for functions [ and [<- for object of the class TransitionLayer.

Usage

transitionMatrix(x) <- value

Arguments

x

Transition* object

value

the value to assign

Details

Methods for functions [[ and [[<- for object of the class TransitionStack.

Examples

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

#Create TransitionLayer objects
tr1 <- transition(r,mean,4)
tr2 <- tr1

#Extracting and replacing
tr1[cbind(1:9,1:9)] <- tr2[cbind(1:9,1:9)]
tr1[1:9,1:9] <- tr2[1:9,1:9]
tr1[1:5,1:5]

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.