I see that spDists can return distances between two shapefiles in either Euclidean distance, or Great Circle distance, and that if you are looking at the distance between shapefiles, that distance will be specified in terms of their projection.
However, I am looking at the distances between two un-projected SpatialPointsDataFrames. Both have the following CRS: +proj=longlat +datum=WGS84 +no_defs
The code that I'm using is here:
mindist = apply(spDists(dhs2016, znshp), 1, min)
Both dhs2016 and znshp are SpatialPointsDataFrames, and this apply()
finds the minimum distance between each point in dhs2016 and its nearest point in znshp. I can see that R is measuring distance as Great Circle distance (I think Euclidean would be going "through" the globe?), by playing with the longlat=
argument. But what are the units? I'm guessing km, but not sure.