destinations: Destinations, in one of the same formats as for origins
mode: Travel mode, one of: "driving", "transit", "walking", "bicycling"
arrival_time: The desired time of arrival for transit directions, as POSIXct
departure_time: The desired time of departure, as POSIXct
avoid: NA (default) or one of: "tolls", "highways", "ferries" or "indoor"
region: The region code, specified as a ccTLD ("top-level domain") two-character value (e.g. "es" for Spain) (optional)
traffic_model: The traffic model, one of: "best_guess" (the default), "pessimistic", "optimistic". The traffic_model parameter is only taken into account when departure_time is specified!
transit_mode: Transit preferred mode, one or more of: "bus", "subway", "train" or "tram"
key: Google APIs key
quiet: Logical; suppress printing URL for Google Maps API call (e.g. to hide API key)
Returns
XML document with Google Maps Distance Matrix API response
Note
Use function mp_get_matrix to extract distance and duration matrix objects