Quantcast
Channel: geosphere distHaversine() & dplyr - error wrong length for vector, should be 2 - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by alistaire for geosphere distHaversine() & dplyr - error wrong...

You need to operate rowwise, so distHaversine is passed a single set of pairs at once instead of all the rows:runways %>% rowwise() %>% mutate(CTD = distHaversine(c(LON, LAT), c(LON2, LAT2)))##...

View Article



geosphere distHaversine() & dplyr - error wrong length for vector, should be 2

I am unable to resolve the error: "wrong length for vector, should be 2" when trying to calculate the (runway length) distance between two points (runway thresholds / ends).To make things worse, I fail...

View Article
Browsing all 2 articles
Browse latest View live


Latest Images