TrajDistance: Trajectory distance

View source: R/query.R

TrajDistanceR Documentation

Trajectory distance

Description

Calculates the distance between the start and end of a trajectory (or a portion of a trajectory). Also called the diffusion distance, net distance, displacement, or bee-line from start to finish.

Usage

TrajDistance(trj, startIndex = 1, endIndex = nrow(trj))

Arguments

trj

Trajectory whose distance is to be calculated.

startIndex

Index of the starting point.

endIndex

Index of the ending point.

Value

Numeric distance from the start to the end of the trajectory.


JimMcL/trajr documentation built on Jan. 31, 2024, 12:57 a.m.