For example, I have this dataframe:
| ID | height | price |
|---|---|---|
| 1 | 10 | 12 |
| 2 | 13 | 7 |
| 3 | 4 | 33 |
| 4 | 10 | 15 |
| 5 | 8 | 49 |
| 6 | 4 | 2 |
| 7 | 5 | 11 |
And I have my own values
height = 11
price = 14
I want to locate the row where ID is 4 because its height and price are closest to my own values. How am I supposed to achieve this in R? I've been trying some dplyr functions but got no luck so far.