【发布时间】:2013-08-20 18:59:41
【问题描述】:
当使用ggmap 和knitr .Rnw 文件时,如何在输出.pdf 中抑制Google 的消息? .Rnw 文件的 MWE 代码用于生成说明问题的 .pdf:
\documentclass{article}
\begin{document}
<<>>=
library(ggmap)
qmap("empire state building", zoom=15, messaging=FALSE, source="google")
@
\end{document}
在生成的.pdf 中,出现以下(格式错误的)消息:
Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=empire+state+building&zoom=15&size=%20640x640&scale=%202&maptype=terrain&sensor=false
Google Maps API Terms of Service : http://developers.google.com/maps/terms
Information from URL : http://maps.googleapis.com/maps/api/geocode/json?address=empire+state+building&sensor=false
Google Maps API Terms of Service : http://developers.google.com/maps/terms
如何抑制这些消息?我希望messaging=FALSE 会这样做。
【问题讨论】:
-
suppressMessages工作吗? -
message = FALSE不是messaging = FALSE? -
messaging = FALSE在ggmap文档中指定。另外,感谢您的解决方案。