[Rd] substitute

Martin Maechler m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Thu Nov 18 15:01:36 CET 2021


>>>>> Duncan Murdoch 
>>>>>     on Mon, 15 Nov 2021 13:06:23 -0500 writes:

    > I'd recommend responding now with a pointer to that bug
    > report: whoever at CRAN is dealing with your package
    > doesn't necessarily know about the bug report.  You might
    > or might not need to make a change in the end, but if you
    > do, it could be hard to meet the two week deadline.

    > Duncan Murdoch

With thanks to Duncan and Adrian:

Just in case, Adrian  hasn't been following R's bugzilla PR#18232
i.e.  https://bugs.r-project.org/show_bug.cgi?id=18232

There have been extra patches to fix more cases of deparsing
while being more back compatible than what's been in R-devel for
a couple of days.

Notably the changes do revert to previous behavior for the
example you give;  and indeed QCA  passes its own checks again,
after applying the patches.

The changes are under review currently, but the plan is to
commit the changes within a few days.
(read on)

    > On 15/11/2021 12:58 p.m., Adrian Dușa wrote:
    >> Thank you, I was given a deadline of two weeks to
    >> respond, hopefully this will be settled by then.  Best
    >> wishes, Adrian
    >> 
    >> On Mon, 15 Nov 2021 at 19:28, Duncan Murdoch
    >> <murdoch.duncan using gmail.com
    >> <mailto:murdoch.duncan using gmail.com>> wrote:
    >> 
    >> This looks as though it is related to the recent patch in
    >> 
    >> https://bugs.r-project.org/show_bug.cgi?id=18232
    >> <https://bugs.r-project.org/show_bug.cgi?id=18232>
    >> 
    >> I think you should probably wait until that settles down
    >> before worrying about it.
    >> 
    >> Duncan Murdoch
    >> 
    >> On 15/11/2021 12:18 p.m., Adrian Dușa wrote: > Dear R
    >> wizards,
    >> >
    >> > I have recently been informed about some build errors
    >> of my package QCA, > which I was able to trace down to
    >> the base function substitute(), with the > following
    >> replication example:

	foo <- function(x) return(substitute(x))

	## In the stable R version 4.0.5, I get the expected result:

	foo(A + ~B + C~D)
	## A + ~B + C ~ D

BTW: no need for foo()  {and even less for a return(.) in a 1-liner !}

Be assured that we agree that

    quote(A + ~B + C~D)

should not "gain" any parentheses, indeed, and what you've been
seeing can well be considered an intermediate step in iterations
to get to improved deparsing in subtle situations.


Thank you for the report, and best regards,
Martin



More information about the R-devel mailing list