我正在optmatch
按如下方式加载 Sweave 文档:
<<myCodeBlock, echo=FALSE>>=
library(optmatch, quietly=TRUE)
@
You're loading optmatch, by Ben Hansen, a package for flexible
and optimal matching. Important license information:
The optmatch package makes essential use of D. P. Bertsekas
and P. Tseng's RELAX-IV algorithm and code, as well as
Bertsekas' AUCTION algorithm and code.
Bertsekas and Tseng freely permit their software to be used for
research purposes, but non-research uses, including the use of it
to 'satisfy in any part commercial delivery requirements to
government or industry,' require a special agreement with them.
By extension, this requirement applies to any use of the
fullmatch() function. (If you are using another package that has
loaded optmatch, then you will probably be using fullmatch indirectly.)
For more information, enter relaxinfo() at the command line
如您所见,我已经尝试了所有我能想到的方法来使包加载消息静音,但无济于事。我认为这是因为他们只是使用了直接cat()
或类似的东西,但这很烦人。关于如何消除这种情况的任何想法,以便那些阅读我最终的、漂亮的、经过修改LaTeX
的 PDF 的人不必阅读关于 RELAX-IV 的内容?
其他似乎不起作用的事情(取自 Andrie 指向相关线程的指针):
suppressMessages(library(optmatch))
suppressPackageStartupMessages(require("optmatch"))
我应该注意到这很明显是 R 问题而不是 Sweave 问题,因为消息也会在 R 中弹出。