On Sat, 06 Feb 2010, Dirk Eddelbuettel wrote:
> | r.library = lambda libname: \
> | r("suppressMessages(library(%r))" % libname)
> suppressMessages() is the best wrapper I am aware of.
I think I've tried it above with the same "success"... and
*> suppressMessages(library(bogus))
Error in library(bogus) : there is no package called 'bogus'
> But if a package uses
> cat() directly
not in this case -- it is just R's loading of libraries
> (rather than packageStartupMessage() which responds to
> suppressMessages()) then all you can do is
> sink("/dev/null")
> library(....)
> sink()
> sink("/dev/null")
> library(glmnet)
Loading required package: Matrix
Loading required package: lattice
> Or alter the packages -- you have the source for all. I have in the past
> (locally) patched packages to suppresses the line noise on startup.
;-) yeah sometimes we need to defer to "whatever works" ;)
--
.-.
=------------------------------ /v\ ----------------------------=
Keep in touch // \\ (yoh@|www.)onerussian.com
Yaroslav Halchenko /( )\ ICQ#: 60653192
Linux User ^^-^^ [175555]
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list