Learn R Programming

trip (version 1.1-6)

trackDistance: Determine distance along a track

Description

Calculate the distance between subsequent 2-D coordinates.

Usage

trackDistance(track, longlat = FALSE, push = 1)

Arguments

track
matrix of 2-columns, with x/y coordinates
longlat
logical - are the data longlat?
push
an offset for measuring distance between this and the next (push) location

Value

  • Vector of distances between coordinates.

Details

This uses the (fast) spDistsN1.