as.Tracks: Coercion to 'Tracks' objects

Description Usage Arguments Value Note Examples

Description

Coercion of MoveBurst, MoveStack and ltraj objects to objects of class Tracks.

Just ltraj objects that contain more than one trajectory of one individual may be coerced to Tracks objects.

For further details please see the vignette!

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'MoveBurst'
as.Tracks(obj)

## S4 method for signature 'MoveStack'
as.Tracks(obj)

## S4 method for signature 'ltraj'
as.Tracks(obj)

Arguments

obj

object of class MoveBurst, MoveStack or ltraj

Value

Object of class Tracks

Note

The method may be used in two ways: as(obj, "Tracks") or as.Tracks(obj).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## load pigeons example data
data(pigeon_R_moveStack)
class(pigeon_R_moveStack)
unique(slot(pigeon_R_moveStack, "trackId"))
length(pigeon_R_moveStack)
# coerce to Tracks
pigeon_R_Trcs <- as.Tracks(pigeon_R_moveStack)
class(pigeon_R_Trcs)
dim(pigeon_R_Trcs)
names(slot(pigeon_R_Trcs, "tracks"))

roland-h/trajaggr documentation built on Jan. 19, 2021, 1:02 p.m.