compare: Compares objects of class 'Track'

Description Usage Arguments Value Author(s) Examples

Description

Calculates distances between two tracks for the overlapping time interval.

Usage

1
2
## S4 method for signature 'Track'
compare(tr1, tr2)

Arguments

tr1

An object of class Track.

tr2

An object of class Track.

Value

A difftrack object. Includes both tracks extended with additional points for the timestamps of the other track. Also includes SpatialLines representing the distances between the tracks.

Author(s)

Nikolai Gorte <n.gorte@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## example tracks
library(sp)
library(xts)
data(A3)
track2 <- A3
index(track2@time) <- index(track2@time) + 32
track2@sp@coords <- track2@sp@coords + 0.003

## compare and plot
difftrack <- compare(A3, track2)
plot(difftrack)

Example output

Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files
NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files
NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files

trajectories documentation built on July 1, 2020, 11:42 p.m.