Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Last answered:

14 Nov 2022

Posted on:

13 Nov 2022

0

distance calculation

how can you use R to calculate the distance between two points in a data frame, I've 4 columns start.lon, start.lat, end.lon, end.lat

1 answers ( 0 marked as helpful)
Instructor
Posted on:

14 Nov 2022

0

Hi Doaa,
thanks for reaching out! You can calculate the absolute distance between points, like so:

df$Absolute_Distance<-abs(df$start.Ion-df1$end.Ion)

Hope this helps!

Best,
365 Eli

Submit an answer