Skip to content

[R-pkg-devel] Reviving IndependenceTests and LAPACK WARNINGs

3 messages · Pierre Lafaye de Micheaux, Duncan Murdoch, Ivan Krylov

#
Dear R developpers,

On the 20th of July, I sent an email to the CRAN team asking respectfully if they would consider adding more LAPACK routines to the R's source tree. Since, I have not received a response from them, I now assume that maybe I used the wrong communication channel (and I apologise if this is the case).

My goal is to revive the "IndependenceTests" package, which was archived in 2021.
I was able to resolve most of the issues, but I still have 2 WARNINGs  and 1 NOTE, such as:

    Warning: GNU Extension: Nonstandard type declaration COMPLEX*16 at (1)

I cannot solve these issues without modifying several (old) Lapack Fortran source files.

In Section 6.7 of the "Writing R Extensions" manual, I read that the current set of LAPACK subroutines included in R "might be supplemented".

Moreover, in https://github.com/SurajGupta/r-source/blob/master/src/modules/lapack/README
I see that some Lapack files (not all the ones I need, unfortunately) were added over the years to the R source tree.

The file I would like to be added is:

zhpevx.f

which in turn needs those below that are not in the R Lapack:

lsame.f
xerbla.f
zhptrd.f
zlanhp.f
zstein.f
zupgtr.f
zupmtr.f

Would you kindly let me know if:


  1.
A formal request to add these LAPACK routines to R's source is something the CRAN team would consider?
  2.
Alternatively, would a submission with these remaining warnings still be acceptable?

I fully understand if this falls outside the scope of CRAN's intended support, but any guidance would be greatly appreciated.

Thank you in advance for your time and consideration.

I wish you a nice day.

Kind regards,
Pierre L.







From: ligges at statistik.tu-dortmund.de <ligges at statistik.tu-dortmund.de>
Sent: Saturday, 12 July 2025 16:05
To: Pierre Lafaye de Micheaux <lafaye at unsw.edu.au>
Cc: ligges at statistik.tu-dortmund.de <ligges at statistik.tu-dortmund.de>
Subject: winbuilder: Package IndependenceTests_0.6.tar.gz has been checked and built

Dear package maintainer,

this notification has been generated automatically.
Your package IndependenceTests_0.6.tar.gz has been built (if working) and checked for Windows.
Please check the log files and (if working) the binary package at:
https://win-builder.r-project.org/XB9bsh1dkkT4
The files will be removed after roughly 72 hours.
Installation time in seconds: 36
Check time in seconds: 67
Status: 2 WARNINGs, 1 NOTE
R Under development (unstable) (2025-07-11 r88405 ucrt)

All the best,
Uwe Ligges
(CRAN maintainer of binary packages for Windows)


This email and any files transmitted with it may contain confidential information. If you believe you have received this email or any of its contents in error, please notify me immediately by return email and destroy this email. Do not use, disseminate, forward, print or copy any contents of an email received in error.
#
Hi.  Just a quick note:  CRAN is the group that runs the package 
repository.  It would be R Core who would decide whether to add those 
LAPACK routines that you are asking for.  There's a big overlap between 
the membership of the two groups, but they are separate.

If you don't get a response from R Core to this message, you could try 
posting a similar message to the R-devel mailing list -- it's the one 
about changes to R itself.  Or you could post it as a feature request on 
bugs.r-project.org (but for that you need an account; see
https://www.r-project.org/bugs.html for a discussion of the procedure).

Duncan Murdoch (not a member of CRAN or R Core).

On 2025-09-19 2:36 a.m., Pierre Lafaye de Micheaux via R-package-devel 
wrote:
#
? Fri, 19 Sep 2025 06:36:12 +0000
Pierre Lafaye de Micheaux via R-package-devel
<r-package-devel at r-project.org> ?????:
These only happen on Win-Builder due to extra checks being enabled
there using the _R_CHECK_WALL_FORTRAN_=TRUE environment variable;
normally R CMD check ignores the warnings about COMPLEX*16 or DOUBLE
COMPLEX, including during CRAN submission checks. See, for example, a
recent upload of the 'QZ' package: the compiler warnings are present
[1], but the check status is OK [2].

WRE 1.6.5 expresses a weak preference for DOUBLE COMPLEX over
COMPLEX*16. If you're willing to make the old Fortran code closer to
Fortran 90 instead of Fortran 77 with extensions, replacing COMPLEX*16
with COMPLEX(KIND(0.0D0)) (and removing 10 spaces to the right to avoid
hitting the line length limit) seems to work too.

The C++ code at https://github.com/lafaye/IndependenceTests has a
couple of more serious problems:

 * The 'new[]' allocation at src/cubature1.cpp:429 is freed using
   'delete' instead of 'delete[]' at src/cubature1.cpp:462, which
   crashes the process for me.
 * The allocation at src/dependogram.cpp:635 seems to be leaked.

Hopefully the July 12 version of the package no longer contains them.