From pgilbert at bank-banque-canada.ca  Wed May  7 10:54:50 2003
From: pgilbert at bank-banque-canada.ca (Paul Gilbert)
Date: Wed May  7 15:56:52 2003
Subject: [Rd] prcomp need Conj(t(s$vt)) (PR#2924) 
Message-ID: <3EB9102A.1A868B9B@bank-banque-canada.ca>

>On Mon, 5 May 2003 pgilbert at bank-banque-canada.ca wrote:

>> In prcomp
>> 
>>         s <- La.svd(x, nu = 0)
>>         s$v <- t(s$vt)
>> 
>> the second above line should be 
>> 
>>         s$v <- Conj(t(s$vt))
>> 
>> (to cover complex cases).

On Mon, 5 May 2003 Prof. Brian Ripley wrote:

>They are not covered in the help page, AFAICS.

>They are certainly not covered in the references quoted.

>Are you not jumping to conclusions?  There is a lot of R that does not 
>handle complex cases, and does not say so. (lm, for one.)

Sorry for the delay, I seem to be experiencing some mail problems.

The prcomp documentation says "matrix" and does not say that the complex case is
not handle but, as you say, there may be many instances of this in R. It says
that prcomp uses La.svd, for which the documentation does mention the complex
case. More importantly, prcomp() now fails in the complex case by return the
wrong answer. I think it should either fail with an error message or return the
correct answer. (And I think the only change required to return the correct
answer is that mentioned above.)

Paul Gilbert


[Rd] prcomp need Conj(t(s$vt)) (PR#2924)
Paul Gilbert