I am using googleway package in R to calculate distances between two points. I had 2 variables names household latitude and longitude and 2 other variables containing lat and long of the corresponding government cooperative store in the locality of the household. So one can easily specify the origin and destination coordinates.
But now i want to calculate the distance of a household from all the household in its locality. There are 12 localities in total, and in each locality there are about 50 (with some variation) households. So for each locality, i need to calculate 49 distances(excluding itself). Can someone help me on how to do it?