The first post of this year 2020, I will dedicate to a question that I was recently asked. The question was how to calculate the shortest distance between different points and how to know which is the closest point. When we work with spatial data in R, currently the easiest thing is to use the sf
package in combination with the tidyverse
collection of packages. We also use the units
package which is very useful for working with units of measurement.