# NOT RUN {
set_key("YOUR_GOOGLE_API_KEY")
google_distance(origins = list(c("Melbourne Airport, Australia"),
c("MCG, Melbourne, Australia"),
c(-37.81659, 144.9841)),
destinations = c("Portsea, Melbourne, Australia"),
simplify = FALSE)
google_distance(origins = c(-37.816, 144.9841),
destinations = c("Melbourne Airport, Australia", "Flinders Street Station, Melbourne"))
google_distance(origins = tram_stops[1:5, c("stop_lat", "stop_lon")],
destinations = tram_stops[10:12, c("stop_lat", "stop_lon")],)
# }
Run the code above in your browser using DataLab