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

gdltraj

Working with Trajectories: Specify a Time Period


Description

Gets the parts of the trajectories stored in an object of class ltraj of type II (time recorded), corresponding to a specified time period.

Usage

gdltraj(x, min, max, type = c("POSIXct", "sec", "min", "hour", "mday",
        "mon", "year", "wday", "yday"))

Arguments

x

an object of class ltraj of type II (time recorded)

min

numeric. The beginning of the period to consider

max

numeric. The end of the period to consider

type

character. The time units of min and max

Details

The limits of the period to consider may correspond to any of the components of the list of class POSIXlt (hour, day, month, etc.; see help(POSIXlt)), or to dates stored in objects of class POSIXct (see examples). The corresponding metadata in the attribute infolocs are also returned.

Value

an object of class ltraj.

Author(s)

See Also

ltraj for further information about objects of class ltraj, POSIXlt for further information about objects of class POSIXlt

Examples

data(puechcirc)
plot(puechcirc, perani = FALSE)

## Gets all the relocations collected
## between midnight and 3H AM 
toto <- gdltraj(puechcirc, min = 0, max = 3, type="hour")
plot(toto, perani = FALSE)

## Gets all relocations collected between the 15th
## and the 25th august 1993
lim <- as.POSIXct(strptime(c("15/08/1993", "25/08/1993"),
                  "%d/%m/%Y", tz="Europe/Paris"))
tutu <- gdltraj(puechcirc, min = lim[1],
                max = lim[2], type="POSIXct")
plot(tutu, perani = FALSE)

adehabitatLT

Analysis of Animal Movements

v0.3.25
GPL (>= 2)
Authors
Clement Calenge, contributions from Stephane Dray and Manuela Royer
Initial release
2020-01-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.