x <- geom_point(1:10, rep(5, 10))
y <- geom_point(1:10, rep(0, 10))
res <- haversine_intermediate(x, y, 0.5)
if (rlang::is_installed(c("wk", "sf"))) {
plot(
c(x, y, res),
col = sort(rep.int(c("red", "blue", "purple"), 10)),
pch = 16
)
}
Run the code above in your browser using DataLab