Henrik Bengtsson
2025-Mar-21 05:51 UTC
[Rd] Suppressed "graphical parameter" warnings reviving themselves magically
What's going on here? $ R --vanilla --quiet> plot.new(); suppressWarnings({ points(0, 0, foo = TRUE) }) > NULLNULL 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) }) > NULLNULL /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.
Duncan Murdoch
2025-Mar-21 09:34 UTC
[Rd] Suppressed "graphical parameter" warnings reviving themselves magically
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 > NULLIn 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 at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Rui Barradas
2025-Mar-21 10:14 UTC
[Rd] Suppressed "graphical parameter" warnings reviving themselves magically
?s 05:51 de 21/03/2025, Henrik Bengtsson escreveu:> 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 at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-develHello, 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 -- Este e-mail foi analisado pelo software antiv?rus AVG para verificar a presen?a de v?rus. www.avg.com
iuke-tier@ey m@iii@g oii uiow@@edu
2025-Mar-21 12:57 UTC
[Rd] [External] Suppressed "graphical parameter" warnings reviving themselves magically
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:> 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 at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics and Fax: 319-335-3017 Actuarial Science 241 Schaeffer Hall email: luke-tierney at uiowa.edu Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu/