Skip to content

Suppressed "graphical parameter" warnings reviving themselves magically

4 messages · Henrik Bengtsson, Duncan Murdoch, Rui Barradas +1 more

#
What's going on here?

$ R --vanilla --quiet
NULL
Warning messages:
1: "foo" is not a graphical parameter
2: "foo" is not a graphical parameter

Note how the warnings are revived in that second "NULL" call.  I can
reproduce this in R 4.4.3 and R-devel (2025-03-19 r88003). This might
be specific to "graphical parameter" warnings, because it won't happen
with, say, suppressWarnings({ log(-1) }).

It also doesn't appear if I call split up the first call into to
different REPL calls;

$ R --vanilla --quiet
NULL

/Henrik

PS. I thought I had sent this many months ago, but I just now found
this message in my draft folder, so now I'm not sure. Sorry, if this
is a duplicate.
#
I don't know what's going on, but I see a version of it in R 4.4.2 on 
MacOS in the console, but not in R.app.

The difference is I only get one of the warnings, and only on the first 
attempt:
In R.app I don't seem to see it at all.

Duncan Murdoch
On 2025-03-21 1:51 a.m., Henrik Bengtsson wrote:
#
?s 05:51 de 21/03/2025, Henrik Bengtsson escreveu:
Hello,

I cannot reproduce this on Windows 11, R 4.4.3.
The command below is not exactly the same but I have tried it with the 
command in the OP and got the same result.



$ R --vanilla --quiet -f "rdevel.R" > ./Temp/rdevel.txt
 > plot.new(); suppressWarnings({ points(0, 0, foo = TRUE) })
 > NULL
NULL
 > sessionInfo()
R version 4.4.3 (2025-02-28 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)

Matrix products: default


locale:
[1] LC_COLLATE=Portuguese_Portugal.utf8 
LC_CTYPE=Portuguese_Portugal.utf8
[3] LC_MONETARY=Portuguese_Portugal.utf8 LC_NUMERIC=C 

[5] LC_TIME=Portuguese_Portugal.utf8

time zone: Europe/Lisbon
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.4.3
 >



Hope this helps,

Rui Barradas
#
Warnings are not "reviving themselves magically". Try resizing the
window a few times and hitting return in the REPL. That should give
you a hint on what is going on.

Best,

luke
On Fri, 21 Mar 2025, Henrik Bengtsson wrote: