path2ctmc: Function to turn a discrete-time continuous-space path into a...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/path2ctmc.R

Description

This function takes a movement path defined by xyt values (not necessarily equally spaced in time), and converts it into a CTMC path (a continuous-time discrete-space path on grid cells in a raster).

Usage

1
path2ctmc(xy, t, rast)

Arguments

xy

A matrix of x,y locations at T time points.

t

A vector of T times associated with the T locations in "xy".

rast

A raster object or raster stack object that will define the discrete-space grid cells for the CTMC movement path.

Details

This takes a xyt path and turns it into a list of the embedded chain and residence times of a continuous time Markov chain walk on the graph. "Diagonal" transitions are fixed with linear interpolation.

Value

ec

A vector of the sequential grid cells (the embedded chain) in the CTMC movement path

rt

A vector of residence times in each sequential grid cell in the CTMC movement path

trans.times

A vector of times in which the movement path enters the grid cell in "ec".

Author(s)

Ephraim M. Hanks

References

Hanks, E. M.; Hooten, M. B. & Alldredge, M. W. Continuous-time Discrete-space Models for Animal Movement The Annals of Applied Statistics, 2015, 9, 145-165

Examples

1
2
3
## For example code, do
##
## > help(ctmcMove)

Example output

Loading required package: raster
Loading required package: sp
Loading required package: Matrix
Loading required package: fda
Loading required package: splines

Attaching package: 'fda'

The following object is masked from 'package:graphics':

    matplot

Loading required package: gdistance
Loading required package: igraph

Attaching package: 'igraph'

The following object is masked from 'package:raster':

    union

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union


Attaching package: 'gdistance'

The following object is masked from 'package:igraph':

    normalize

ctmcmove documentation built on May 2, 2019, 5:25 p.m.