Learn R Programming

adehabitatLT (version 0.3.28)

redisltraj: Rediscretization of a Trajectory With Regular Step Length or Duration

Description

This functions rediscretizes one or several trajectories in an object of class ltraj.

Usage

redisltraj(l, u, burst = NULL, samplex0 = FALSE, addbit = FALSE,
           nnew = 5, type = c("space", "time"))

Value

An object of class "ltraj"

Arguments

l

an object of class ltraj

u

the new step length in units of the coordinates or step duration in seconds

burst

The burst identity of trajectories to be rediscretized.

samplex0

Whether the first relocation of the trajectory should be sampled

addbit

logical. When type="space", whether the line segment linking the last relocation of the rediscretized trajectory and the last relocation of the raw trajectory should be added to the result (can be useful for computation of fractal dimension)

nnew

optionnally, you may specify the maximum ratio between number of relocations of the new trajectory. If not specified, this maximum is equal to 5 times the number of relocations of the raw trajectory.

type

a character string indicating whether the step duration ("time") or length ("space" should be constant

Author

Clement Calenge clement.calenge@ofb.gouv.fr

Details

The rediscretization of trajectory has been advocated by several authors in the literature (Turchin 1998, Bovet & Benhamou 1988). It is also the first step of the computation of the fractal dimension of the path (Sugihara & May 1990).

When type="time", a linear interpolation is performed to find new relocations separated by the given time lag.

References

Bovet, P., & Benhamou, S. (1988) Spatial analysis of animal's movements using a correlated random walk model. Journal of Theoretical Biology 131: 419--433.

Turchin, P. (1998) Quantitative analysis of movement, Sunderland, MA.

Sugihara, G., & May, R. (1990) Applications of fractals in Ecology. Trends in Ecology and Evolution 5: 79--86.

See Also

ltraj for further information on objects of class ltraj

Examples

Run this code
#####################################
##
## Example of space rediscretization

data(puechcirc)

puechcirc

## before rediscretization
plot(puechcirc, perani = FALSE)

## after rediscretization
toto <- redisltraj(puechcirc, 100)
plot(toto, perani = FALSE)


#####################################
##
## Example of time rediscretization

data(buffalo)
tr <- buffalo$traj

## Show the time lag before rediscretization
plotltr(tr, "dt")

## Rediscretization every 1800 seconds
tr <- redisltraj(tr, 1800, type="time")

## Show the time lag after rediscretization
plotltr(tr, "dt")

Run the code above in your browser using DataLab