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:

$ R

R version 4.4.2 (2024-10-31) -- "Pile of Leaves"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

plot.new(); suppressWarnings({ points(0, 0, foo = TRUE) })
NULL
NULL
Warning message:
"foo" is not a graphical parameter
plot.new(); suppressWarnings({ points(0, 0, foo = TRUE) })
NULL
NULL

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:
What's going on here?

$ R --vanilla --quiet
plot.new(); suppressWarnings({ points(0, 0, foo = TRUE) })
NULL
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
plot.new()
suppressWarnings({ points(0, 0, foo = TRUE) })
NULL
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.

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to