The structure of time may be different depending on class, however, the method for extracting time from each object is the same. The `t1()` and `t2()` functions extract the start time (t1) and end time (t2) for each sftrack object posix and numeric classes. However this is context dependent. See details for more...

t1(x)

t2(x)

Arguments

x

time object of sftrack/sftraj/sft_timestamp/POSIX/numeric

Details

The simplest function is t1, which extracts the start time for each data point. In an sftrack and sftraj object these are the same times.

t2 may extract different times depending on the context:

For an sftraj, t2 extracts the end time for each step. This is stored as [[2]] in each row. And is calculated when an sftraj object is created.

For an sftrack/POSIX/numeric object, t2 is calculated as the lag(1) time for each time:group combination. These are not the same calculations as sftraj and may result in different results because of subsetting.