Message-ID: <20230219221115.5cddcf9e@Tarkus>
Date: 2023-02-19T19:11:15Z
From: Ivan Krylov
Subject: R: determine if `suppressMessages()` has been invoked
In-Reply-To: <717647429.1574291.1676828755719@webmail.strato.de>
On Sun, 19 Feb 2023 18:45:55 +0100 (CET)
Nino Hardt <me at 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