使用してスペースを全く問題は私のgoogleway
パッケージが
library(googleway)
apiKey <- 'your_api_key'
google_distance(origins = list("PAWTUCKET+LOWELL+MA"),
destinations = list("INDUSTRIAL WAY+SALEM+NH"),
mode = "driving",
key = apiKey)
# $destination_addresses
# [1] "Industrial Way, Salem, NH 03079, USA"
#
# $origin_addresses
# [1] "Pawtucket Blvd, Lowell, MA 01854, USA"
#
# $rows
# elements
# 1 23.2 km, 23150, 27 mins, 1648, 27 mins, 1605, OK
#
# $status
# [1] "OK"
と述べた、とハック-Rはその答えにに示唆したように、あなたのスペースを持っているので、実際にエラーが発生ありませんdestination
(「工業的方法+セレン+ NH」)。これを+
に置き換えると正常に動作します。実際のエラーは、ボンネットの下にgmapsdistance
で使用されてXML
パッケージから付属の資料?gmapsdistance
If more than one word for a same location is used, they should be separated by a plus sign e.g. "Bogota+Colombia"
から
gmapsdistance(origin = "PAWTUCKET+LOWELL+MA",
destination = "INDUSTRIAL+WAY+SALEM+NH",
combinations = "all",
mode = "driving",
key = 'api_key')
$Time
[1] 1591
$Distance
[1] 23150
$Status
[1] "OK"
。
下記の私の解決策を見て、問題がある場合はお知らせください。これで問題が解決したら、チェックマークをクリックして、将来の読者に解決策があることを知らせてください。 –