MSTDist: Calculates the minimum spanning tree distance, in kilometers,...

Description Usage Arguments Details Value References Examples

View source: R/MSTDist.R

Description

Calculates the minimum spanning tree distance, in kilometers, using Prim's Algorithm [1]

Usage

1
MSTDist(longs, lats)

Arguments

longs

- Longitudinal occurrences in decimal degrees

lats

- Latitudinal occurrences in decimal degrees

Details

Uses Prim's algorithm for finding the minimum spanning tree, time-consuming calculation as the number of locations increases past 1000

Value

Returns the minimum spanning tree distance in kilometers, the pairwise distance matrix of occurrences, the order points were connected in, and a 2-column array of coordinates

References

[1] Prim, R.C. 1957. Shortest Connection Networks and Some Generalizations. The Bell System Technical Journal 36:1389-1401.

Examples

1
2
3
longs<-c(12,34,-55)
lats<-c(-41,3,56)
MSTDist(longs,lats)

GeoRange documentation built on June 20, 2017, 9:03 a.m.

Related to MSTDist in GeoRange...