I'm trying to calculate the driving distance between two coordinate locations. Here's my code:
library(tidyverse)
library(googleway)
distances %>%
mutate(distance = google_distance(origins = origin, destinations = destination, key = 'API KEY'))
Here's my dataset - https://pastebin.com/d6Z6b2K5
I get this error:
Error in mutate():
! Problem while computing distance = google_distance(...).
✖ distance must be size 294 or 1, not 5.
I'd really appreciate some help with this!