GetVT: Obtain VT table from Track

View source: R/GetVT.r

GetVTR Documentation

Obtain VT table from Track

Description

The VT table computes speeds, step lengths, orientations, turning angles and ancillary variables from a track. The output of this function is (typically) meant to feed the WindowSweep function.

Usage

GetVT(Data, units = "hour", skiplast = TRUE)

Arguments

Data

a track to analyze. Must contain columns: X, Y and Time (as a POSIX object). The track class is a robust entry.

units

the time units for the analysis; one of sec, min, hour, day.

skiplast

filters away last step.

Value

a data frame with the following columns:

Z.start, Z.end

the start and end locations (as complex coordinates)

S

the step length

Phi, Theta

absolute and turning angle, respectively

T.start, T.end

start and time of steps (numeric - in given units)

T.mid

temporal midpoint of the step

dT

duration of the step

V

approximate speed (S/dT)

T.POSIX

the temporal midpoint of the step as a POSIX objects.

Author(s)

Eliezer Gurarie

See Also

WindowSweep

Examples

data(Simp)
plot(Simp)
Simp.VT <- GetVT(Simp)
head(Simp.VT)
# Distribution of estimated speeds
hist(Simp.VT$V, col="grey", breaks=20)
# Distribution of turning angles

if (requireNamespace("circular", quietly = TRUE)) 
   circular::rose.diag(Simp.VT$Theta, bins=24) else
     hist(Simp.VT$Theta)

bcpa documentation built on May 30, 2022, 5:07 p.m.