Learn R Programming

move (version 2.1.0)

seglength: Calculates the segment length of a track

Description

Calculates the segment length of a track

Usage

# S4 method for SpatialPointsDataFrame
seglength(x)

Arguments

x

a SpatialPointsDataFrame, like a Move or MoveStack object

Value

If the SpatialPointsDataFrame is projected in longitude latitude coordinates, the returned values are in meters. If not, the distances are Euclidean distances in map units. Distances are calculates with the pointDistance from the package raster. Note that in stacks distances are not split between animals.

Details

The seglength function calculates the distances between point 1 and point 2, point 2 and point 3, ... .

Examples

Run this code
# NOT RUN {
data(leroy)
data(fishers)  
head(seglength(leroy)) #Move object in longlat projection
head(seglength(fishers)) #MoveStack object in aeqd projection
# }

Run the code above in your browser using DataLab