I use the following function to estimate the time (in hours) to drive a certain distance, assuming an average speed of 65 km/h:
distHoras <- function(orig
I'm going to throw my own pacakge into the mix that also queries Google's API for you
(You need a valid Google API key to use it)
library(googleway)
api_key <- "your_api_key_here"
google_distance(origins = "Paris",
destinations = "London",
key = api_key)
# $destination_addresses
# [1] "London, UK"
#
# $origin_addresses
# [1] "Paris, France"
#
# $rows
# elements
# 1 456 km, 456230, 5 hours 31 mins, 19858, 6 hours 12 mins, 22311, OK
#
# $status
# [1] "OK"