I want to calculated to which cluster a point belongs, based on the euclidean distance.
clusters xcor ycor
1 64.99206 78.48413
2 1102.00000 2466.67500
3 1598.11060 1298.10138
4 499.86441 736.72881
Location's are :
location xcor ycor
1 511 78
2 1354 2466
3 511 1298
So it should check for all the locations, to which cluster it belongs based on the shortest distance. Is there a function/package for this that can easily preform this?