I\'m loading optmatch in a Sweave document as follows:
<>=
library(optmatch, quietly=TRUE)
@
You\'re loadi
Here is an R solution to your problem. The package author uses cat to print the messages to the console, rather than using standard message statements. You can intercept these messages by using sink to divert console output to a temporary file:
<>=
zz <- tempfile()
sink(file=zz)
library(optmatch, quietly=TRUE))
unlink(zz)
@
PS. The solution by @XuWang uses only SWeave, so is clearly much more suitable in your case.