# Projected CRS
data(pts_pop_simul)
mat_dist <- mat_geo_dist(data=pts_pop_simul,
ID = "ID",
x = "x",
y = "y")
#Polar CRS
city_us <- data.frame(name = c("New York City", "Chicago",
"Los Angeles", "Atlanta"),
lat = c(40.75170, 41.87440,
34.05420, 33.75280),
lon = c(-73.99420, -87.63940,
-118.24100, -84.39360))
mat_geo_us <- mat_geo_dist(data = city_us,
ID = "name", x = "lon", y = "lat",
crds_type = "polar")
Run the code above in your browser using DataLab