0

I have two data sets e.g. data1(58000 rows, house coordinates) and data2 (7500 rows, lake coordinates). I am targeting to identify the shortest distance from the closest lake for every house.

I have found the answer of similar problem but it is not working. r - Finding closest coordinates between two large data sets

My expected answers are: 1. Find out the shortest distance from each house coordinates to nearest lake coordinates 2. Identify the lake that is the closest by ID/coordinates 3. Expected data frame: House ID. Latitude Longitude Closest distance Closest lake ID.

Phil
  • 7,287
  • 3
  • 36
  • 66
Megh
  • 1
  • 2
    can you please provide [reproductible example](https://stackoverflow.com/a/5963610/3713478) – nurandi Mar 29 '20 at 19:37
  • [finding_closest_coordinates](https://stackoverflow.com/questions/55752064/r-finding-closest-coordinates-between-two-large-data-sets), if Robert Hijmans is answering, it's probably working. Which code examples there did you try? – Chris Mar 30 '20 at 02:58
  • Finally, I am able to solve my problem with the code mentioned in my problem. Thank you. – Megh Mar 30 '20 at 04:07

0 Answers0