Learn R Programming

adehabitatLT (version 0.3.28)

offsetdate: Date Handling in an Object of Class 'ltraj'

Description

This functions allows to set an offset value from the date in an object of class ltraj of type II (time recorded).

Usage

offsetdate(ltraj, offset, units = c("sec", "min", "hour", "day"))

Value

an object of class ltraj

Arguments

ltraj

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

offset

a numeric value indicating the offset to be deducted from the date

units

a character string indicating the time units for offset

Author

Clement Calenge clement.calenge@ofb.gouv.fr

Details

The use of offset is a convenient way to define reference dates in an object of class ltraj. For example, if the animal is monitored every night, from 18H00 to 06H00, the fact that the beginning and the end of the monitoring do not correspond to the same day may cause difficulties to handle the trajectory. Though these difficulties are not unsurmountable, it is often convenient to deduct an offset to the trajectory, so that the first relocation is collected at 0H and the last one at 12H00 the same day (i.e., in this example, an offset of 18 hours).

See Also

ltraj for additional information on objects of class ltraj

Examples

Run this code
data(puechcirc)

plotltr(puechcirc, "dt")

toto <- offsetdate(puechcirc, 17, "hour")

plotltr(puechcirc, "dt")

Run the code above in your browser using DataLab