# NOT RUN {
# setup distance matrix
# two-column matrix with latitude/longitude, in degrees
latLong = cbind(runif(n = 5, min = 0, max = 90),
runif(n = 5, min = 0, max = 180))
# Vincenty Ellipsoid distance formula
distMat = calcVinEll(latLongs = latLong)
# calculate gamma distribution over distances
# shape and rate are just for example
kernMat = calcGammaKernel(distMat = distMat, shape = 1, rate = 1)
# }
Run the code above in your browser using DataLab