Learn R Programming

trajectories (version 0.2-9)

avedistTrack: Average pairwise distance of trajectory pattern over time

Description

This measures the average of pairwise distances between tracks over time.

Usage

avedistTrack(X,timestamp)

Value

An object of class "distrack". It can be plotted over time.

Arguments

X

a list of some objects of class "Track"

timestamp

timestamp to calculate the pairwise distances between tarcks

Author

Mohammad Mehdi Moradi <moradi@uji.es>

Details

This function calculates the average pairwise distance between a list of tracks according to a given timestamp.

See Also

as.Track.ppp

Examples

Run this code
if (require(spatstat.geom)) {
 X <- list()
 for(i in 1:10){
  m <- matrix(c(0,10,0,10),nrow=2,byrow = TRUE)
  X[[i]] <- rTrack(bbox = m,transform = TRUE)
 }

 ave <- avedistTrack(X,timestamp = "120 secs")
 plot(ave,type="l")
}

Run the code above in your browser using DataLab