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

View source: R/offsetdate.r

offsetdateR Documentation

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"))

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

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).

Value

an object of class ltraj

Author(s)

Clement Calenge clement.calenge@ofb.gouv.fr

See Also

ltraj for additional information on objects of class ltraj

Examples

data(puechcirc)

plotltr(puechcirc, "dt")

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

plotltr(puechcirc, "dt")


adehabitatLT documentation built on Sept. 11, 2024, 7:15 p.m.