Solucionado!!
```{r}
df1 <- data.frame("x1"=c(70,10,50), "y1"=c(20,25,60))
df2 <- data.frame("x2"=c(1,2,45,7,8,5,4,13,3,6), "y2"=c(2,5,36,4,3,2,6,27,9,8))
dist_func = function (x1, y1, x2, y2){
 dist = sqrt(((x2 - x1)^2) + ((y2-y1)^2))
 return(dist)
}
# Container columns for closest point
df1$x_closest = NA
df1$y_closest = NA
df1$dist = NA
for(i in 1:nrow(df1)){
 min_dist = 0
 x1 = df1$x1[i]
 y1 = df1$y1[i]
 for(j in 1:nrow(df2)){
 x2 = df2$x2[j]
 y2 = df2$y2[j]
 current_dist = dist_function(x1, y1, x2, y2)
 if(j == 1){
 min_dist = current_dist
 x_closest = x2
 y_closest = y2
 }
 if(current_dist < min_dist){
 min_dist = current_dist
 x_closest = x2
 y_closest = y2
 }
 }
 df1$x_closest[i] = x_closest
 df1$y_closest[i] = y_closest
 df1$dist[i] = min_dist
}
```