calcCos | R Documentation |
This function calculates geodesic distance using the cosine method.
calcCos(latLongs, r = 6378137)
latLongs |
Two column matrix of latitudes/longitudes |
r |
Earth radius. Default is WGS-84 radius |
# two-column matrix with latitude/longitude, in degrees
latLong = cbind(runif(n = 5, min = 0, max = 90),
runif(n = 5, min = 0, max = 180))
# cosine distance formula
distMat = calcCos(latLongs = latLong)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.