[Rd] (PR#2867)

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Jul 18 09:45:23 MEST 2003


On 18 Jul 2003, Peter Dalgaard BSA wrote:

> richard.roger at agric.nsw.gov.au writes:
> 
> > 
> > As an R novice, I am puzzled that the call to dgeqp3 has more arguments 
> > than dgeqp3 itself.  The call has an extra argument "rwork".  But this 
> > could explain the strange error code!
> > 
> > The call:
> > 
> >     F77_CALL(dgeqp3)(&m, &n, REAL(A), &m, INTEGER(jpvt), REAL(tau),
> >                      &tmp, &lwork, rwork, &info);
> > 
> > The subroutine:
> >       SUBROUTINE DGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO )
> 
> I don't think you need to be a novice to be puzzled by that one...
> The extra argument would likely cause info not to be modified, and
> being uninitialized it can contain random garbage, quite possibly < 0. 
> 
> But what was the allocation of rwork supposed to be good for then??

It is needed for the complex version of qr(), and I failed to notice the 
difference in the calls when producing the real version with LAPACK=TRUE.

Fixed now.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list