【发布时间】:2014-04-16 19:37:54
【问题描述】:
我正在尝试使用 ggmap qmap 函数 (http://www.inside-r.org/packages/cran/ggmap/docs/qmap)
qmap(location = 'baylor university', zoom = 14, maptype = 'watercolor', source = 'stamen')
并得到以下错误:
qmap(location = '贝勒大学', zoom = 14, maptype = 'watercolor', source = 'stamen') 来自 URL 的映射: http://maps.googleapis.com/maps/api/staticmap?center=baylor+university&zoom=14&size=%20640x640&maptype=terrain&sensor=false 谷歌地图 API 服务条款: http://developers.google.com/maps/terms 来自 URL 的信息: http://maps.googleapis.com/maps/api/geocode/json?address=baylor+university&sensor=false 谷歌地图 API 服务条款: http://developers.google.com/maps/terms readPNG(destfile) 中的错误: 文件不是PNG格式
【问题讨论】:
-
看起来您正在尝试从
?ggmap中找到的示例中运行某些内容?您应该注意到?ggmap的示例代码被## Not run:/\dontrun{}包围。其中,根据this SO-answer,意味着代码“不应在示例函数中执行”。要么是因为它太耗时,要么是因为它需要用户输入。我怀疑在这个例子中是后者。