I have a dataset with a list of points. The points represents something that is moving on a territory, so I have for each point the current position (x, y) and the future position (target_x, target_y), and the distance between current and future position.
How can I calculate in R for each point the angle and direction between their current and future position? For example if that point is moving to Northeast the value I would like to obtain would be close to 45º, while it would be 180º if is moving to Southwest.
Thanks