[R-pkg-devel] Advice for addressing CRAN rejection
smallepsilon
@m@||ep@||on @end|ng |rom proton@me
Tue May 13 21:08:00 CEST 2025
Ben,
The thread to which I alluded is here: https://stat.ethz.ch/pipermail/r-help/2025-May/480866.html
Further clarification: The package provides some convenience shortcuts for the user which should run the same calculations as their longer counterparts. I want to use identical() to provide strong evidence that this is happening. Suppose, for example, that X is a symmetric, positive definite matrix. Then identical() will usually distinguish between (X^1/2)^-1 and (X^-1)^1/2 (the kind of thing I want to be able to check) while all.equal() will generally not (unless I set the tolerance sufficiently low, but that is just making all.equal() behave more like identical()). Using all.equal() helps detect catastrophic errors, but those would be detected in other tests already.
Thanks,
Jesse
On Tuesday, May 13th, 2025 at 1:41 PM, Ben Bolker <bbolker using gmail.com> wrote:
> Can you please clarify (maybe by linking back to an earlier thread, don't remember if you discussed this previously) what you mean by "I realized that because all.equal() does not test (even as a proxy) that the same calculations were done"?
>
>
> On Tue, May 13, 2025, 1:05 PM smallepsilon <smallepsilon using proton.me> wrote:
>
> > I have been trying to fix some issues with my package's testing on CRAN, which culminated in a rejection email from a CRAN administrator that I am not sure how to address.
> >
> > The first issues arose with MKL. (I got helpful information about that recently on r-help.) In many package tests, I want to verify that two ways of specifying something lead to the execution of exactly the same calculations. I use identical() as a proxy for this, but because numeric results are not necessarily reproducible when using parallel processing, this does not work on all platforms.
> >
> > My initial attempts to address this involved replacing the offending identical() calls with all.equal() calls. After two or three such attempts, I realized that because all.equal() does not test (even as a proxy) that the same calculations were done, it is impractical and unnecessary to run these tests on all of the CRAN platforms. I moved the original test files to a separate folder on my computer so I can run them all locally. (My assumption is that if the logic is correct on my computer, then it is correct on all of them, and identical() helps verify this.) In the newest package version uploaded to CRAN, I included the tests that verify the essential functionality of the package so that the crucial output values are the same on all platforms, up to a reasonable number of significant digits. These are the tests that are clearly important to run on all platforms.
> >
> > My submission was rejected, not because of test failures, but because I had "removed the failing tests which is not the idea of tests." No errors/warnings/notes were reported to me. The only option I have been given is to replace identical() with all.equal(), which defeats the purpose of these particular tests.
> >
> > I replied to the administrator's email with a brief version of all of this, but have not gotten a response. Any advice on what else I could do would be appreciated.
> >
> > Thanks,
> >
> > Jesse
> >
> > ______________________________________________
> > R-package-devel using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
More information about the R-package-devel
mailing list