Description Usage Arguments Value Examples
Generate a distance matrix of great-circle distances from a dataframe with longitude and latitude distances
1 |
df |
Your data frame |
A haversine distance matrix
1 2 3 4 5 6 | points <- read.csv("dividedEvents1.csv",header=T, sep=",")
df.points <- as.matrix(points)
antFrame = data.frame(df.points)
print("Computing distance matrix...")
require(geosphere)
d <- genHaversineMat(antFrame)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.