[Rd] maximum matrix size

Peter Langfelder peter@l@ngfelder @ending from gm@il@com
Tue Oct 2 19:22:42 CEST 2018

Does this help a little?


One thing I seem to remember but cannot find a reference for is that
long vectors can only be passed to .Call calls, not C/Fortran. I
remember rewriting .C() in my WGCNA package to .Call for this very
reason but perhaps the restriction has been removed.

On Tue, Oct 2, 2018 at 9:43 AM Therneau, Terry M., Ph.D. via R-devel
<r-devel using r-project.org> wrote:
> I am now getting the occasional complaint about survival routines that are not able to
> handle big data.   I looked in the manuals to try and update my understanding of max
> vector size, max matrix, max data set, etc; but it is either not there or I missed it (the
> latter more likely).   Is it still .Machine$integer.max for everything?   Will that
> change?   Found where?
> I am going to need to go through the survival package and put specific checks in front
> some or all of my .Call() statements, in order to give a sensible message whenever a
> bounday is struck.  A well meaning person just posted a suggested "bug fix" to the github
> source of one routine where my .C call allocates a scratch vector, suggesting  "resid =
> double( as.double(n) *nvar)" to prevent a "NA produced by integer overflow" message,  in
> the code below.   A fix is obvously not quite that easy :-)
>          resid <- .C(Ccoxscore, as.integer(n),
>                  as.integer(nvar),
>                  as.double(y),
>                  x=as.double(x),
>                  as.integer(newstrat),
>                  as.double(score),
>                  as.double(weights[ord]),
>                  as.integer(method=='efron'),
>                  resid= double(n*nvar),
>                  double(2*nvar))$resid
> Terry T.
>         [[alternative HTML version deleted]]
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

More information about the R-devel mailing list