Я загружаю 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?
Другие вещи, которые, похоже, не работают (возьмитеУказатель Андри на связанный поток ):
suppressMessages(library(optmatch))
suppressPackageStartupMessages(require("optmatch"))
Должен заметить, что это, очевидно, проблема R, а не проблема Sweave, так как сообщения всплывают и в R.