[Rd] make check fails due to NA / NaN mismatch

Martin Maechler m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Mon Aug 31 12:23:19 CEST 2020


>>>>> Korpela Mikko (MML) 
>>>>>     on Mon, 31 Aug 2020 08:46:55 +0000 writes:

    > Thank you for the introduction to these recent changes, Martin.
    > I think this was the second time I ran "make check" on that platform (Raspberry Pi 32-bit), and the first time (some months ago) it worked fine. So, that makes it kind of "suddenly", although I must say that my use of "make check" is very irregular.

    > I compared code before and after the split you are referring to. The test in question changed in the process:

    > This is a snippet of "tests/d-p-q-r-tests.R" (lines 1030--1034) at revision 79079, just before the split:

    > if(!inherits(R$warning, "simpleWarning")) cat(" .. did *NOT* give a warning! ")
    > if(!(identical(R$value, expected))) { ## allow NA/NaN mismatch in these cases for now:

> if(!(dist %in% c("beta","f","t") && all(is.na(R$value))))
    > cat(" .. not giving expected NA/NaN's ")
    > }

    > The corresponding piece of code in "tests/d-p-q-r-tst-2.R" (lines 588--591) after the split, at revision 79080, is:

    > if(!inherits(R$warning, "simpleWarning")) stop(" .. did *NOT* give a warning! ")
    > if(!(identical(R$value, expected))) { ## allow NA/NaN mismatch in these cases for now:
    > stop(" .. not giving expected NA/NaN's ")
    > }

    > where the test is less forgiving, both with respect to the conditions and the type of "nag" (cat vs stop).

aahh..   thank you!

The cat() to  stop() change was very much on purpose
{for the old test files, all output differences eventually
 turned to test errors via "make" and 'R CMD Rdiff',  whereas
 now the R code itself should error in those cases }

but "of course" it was a lapsus of mine to have dropped the

    if(! (dist %in% ...  && all(....)) )

line accidentally.....  no re-added in svn c79092.

Martin



More information about the R-devel mailing list