as.ltraj {adehabitat}R Documentation

Working with Trajectories in 2D Space: the Class ltraj

Description

The class ltraj is intended to store trajectories of animals monitored using radio-tracking.
as.ltraj creates an object of this class.
summary.ltraj returns the number of relocations for each "burst" of relocations and each animal.
traj2ltraj, and the reciprocal function ltraj2traj respectively converts an object of class ltraj to an object of class traj, and conversely.

Usage

as.ltraj(xy, date, id, burst = id, slsp = c("remove", "missing"))
print.ltraj(x, ...)
summary.ltraj(object, ...)
traj2ltraj(traj, slsp =  c("remove", "missing"))
ltraj2traj(x)

Arguments

x, object an object of class ltraj
xy a data.frame containing the x and y coordinates of the relocations
date a vector of class POSIXct giving the date for each relocation
id a character string indicating the identity of the animal
burst a character string indicating the identity of the burst of relocations
slsp a character string used for the computation of the turning angles (see details)
traj an object of class traj
... For other functions, arguments to be passed to the generic functions summary and print

Details

Objects of class ltraj allow the analysis of animal movements. They contain the information generally used in such studies (angles, length of moves, increases in the x and y direction, etc., See below).

For a given individual, trajectories are often sampled as "bursts" of relocations (Dunn and Gipson, 1977). For example, when an animal is monitored using radio-tracking, the data may consist of several circuits of activity (two successive relocations on one circuit are often highly autocorrelated, but the data from two circuits may be sampled at long intervals in time). These bursts are indicated by the attribute burst. Note that the bursts should be unique: do not use the same burst id for bursts collected on different animals.

The computation of turning angles may be problematic when successive relocations are located at the same place. In such cases, at least one missing value is returned. For example, let r1, r2, r3 and r4 be 4 successive relocations of a given animal (with coordinates (x1,y1), (x2,y2), etc.). The turning angle in r2 is computed between the moves r1-r2 and r2-r3. If r2 = r3, then a missing value is returned for the turning angle at relocation r2. The argument slsp controls the value returned for relocation r3 in such cases. If slsp == "missing", a missing value is returned also for the relocation r3. If slsp == "remove", the turning angle computed in r3 is the angle between the moves r1-r2 and r3-r4.

Value

summary.ltraj returns a data frame.
ltraj2traj returns an object of class traj.
All other functions return objects of class ltraj. An object of class ltraj is a list with one component per burst of relocations. Each component is a data frame with two attributes: the attribute "id" indicates the identity of the animal, and the attribute "burst" indicates the identity of the burst. Each data frame stores the following columns:

x the x coordinate for each relocation
y the y coordinate for each relocation
date the date for each relocation
dx the increase of the move in the x direction
dy the increase of the move in the y direction
dist the length of each move
dt the time interval between successive relocations
R2n the squared net displacement between the current relocation and the first relocation of the trajectory
abs.angle the angle between each move and the x axis
rel.angle the turning angles between successive moves.

Note

The class ltraj is a better alternative to the class traj. Indeed, the class ltraj already contains the basic information needed for the modelling of movement processes. In a close future, many functions will be added to adehabitat, allowing such a modelling.

Furthermore, note that the computation of the turning angles is faster with as.ltraj than with angles.

Author(s)

Clément Calenge calenge@biomserv.univ-lyon1.fr
Stéphane Dray dray@biomserv.univ-lyon1.fr

References

Dunn, J.E. and Gipson, P.S. (1977) Analysis of radio telemetry data in studies of home range. Biometrics. 59, 794–800.

See Also

c.ltraj to combine several objects of class ltraj, Extract.ltraj to extract or replace bursts of relocations, plot.ltraj for graphical displays, gdltraj to specify a time period. For further information on the class traj, see as.traj.

Examples


data(puechabon)
locs <- puechabon$locs
locs[1:4,]
lixy <- split(locs[,c("X","Y")],locs$Name)

### Conversion of the date to the format POSIX
da <- as.character(locs$Date)
da <- as.POSIXct(strptime(as.character(locs$Date),"%y%m%d"))
lidat <- split(da,locs$Name)

### Creation of an object of class "ltraj", with for 
### example the first animal
(tr1 <- as.ltraj(lixy[[1]], date = lidat[[1]], id="Brock"))

## The components of the object of class "ltraj"
head(tr1[[1]])

## With all animals
litr <- lapply(1:4, function(i) as.ltraj(lixy[[i]], 
               date = lidat[[i]], id = names(lidat)[i]))

(tr <- do.call("c.ltraj", litr))


[Package adehabitat version 1.4 Index]