From p.dalgaard at biostat.ku.dk  Fri Jul 18 01:09:15 2003
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard BSA)
Date: Fri Jul 18 02:09:18 2003
Subject: [Rd] (PR#2867)
In-Reply-To: <200307172331.h6HNVFJH023196@pubhealth.ku.dk>
References: <200307172331.h6HNVFJH023196@pubhealth.ku.dk>
Message-ID: <x2u19k66bk.fsf@biostat.ku.dk>

richard.roger@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??

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] (PR#2867)
Peter Dalgaard BSA