[Rd] R: determine if `suppressMessages()` has been invoked

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Sun Feb 19 20:11:15 CET 2023


On Sun, 19 Feb 2023 18:45:55 +0100 (CET)
Nino Hardt <me using ninohardt.com> wrote:

> When using C or C++ via Rinside or within a package, those functions
> do not listen to suppressMessages, e.g. `Rprintf` keeps printing to
> the console. 

True, Rprintf is really convenient, but it doesn't raise any conditions
and just prints straight to the console. While calling R message() from
C is possible, it doesn't format anything.

There's a wishlist item for a C entry point for message() (I would
argue that a "messagef" taking a format string would be even better),
but it's waiting for someone with free time to implement it:
https://bugs.r-project.org/show_bug.cgi?id=17612

-- 
Best regards,
Ivan



More information about the R-devel mailing list