[R] R crashes during 'eigen'
Martin Maechler
maechler at stat.math.ethz.ch
Wed Mar 29 18:01:55 CEST 2006
>>>>> "Simon" == Simon Wood <sw283 at maths.bath.ac.uk>
>>>>> on Wed, 29 Mar 2006 16:14:14 +0100 (BST) writes:
>> It looks like there might be a bug in the symmetry detection routine of
>> eigen. When I do
>>
>> eigen(M, symmetric=FALSE)
>>
>> it works fine.
Simon> - but the matrix is symmetric, which seems to be correctly detected
Simon> (since eigen() hangs whether symmetric=TRUE is supplied or not).
>> Eigenvalues (after omitting their imaginary parts, which
>> are essentially zeros) are the same as the ones obtained with EISPACK to
>> within a small multiple of machine epsilon.
>>
>> However, the eigenvector matrices seem different ! This happens on
>> R-2.2.1-patched and R-2.3.0 (both compiled from daily snapshots).
Simon> - This is OK isn't it? All the non-zero eigenvalues are the same for this
Simon> matrix, so the eigenvectors can't be uniquely defined, can they?
Indeed, you are right, Simon.
But anyway the fact is that the LAPACK based eigen seems to end
in an infinite loop, and I can confirm the behavior for at least
R 2.2.1, R-patched and R-devel (aka "2.3.0 alpha") with the "R
builtin" versions of BLAS and LAPACK and also with Atlas.
Seems quite a bad story to me at the moment.
I assume that octave (or matlab) which are also based on BLAS +
LAPACK internally can eigen-decompose the matrix correctly?
Could anyone check this (without much effort) for us?
Thanks in advance,
Martin Maechler, ETH Zurich
Simon> best,
Simon> Simon
>> - Simon Wood, Mathematical Sciences, University of Bath, Bath BA2 7AY
>> - +44 (0)1225 386603 www.maths.bath.ac.uk/~sw283/
>>
>> Andy
>>
>> PS. My system is Windows 2000 on a Xeon CPU. I use precompiled Pentium 4
>> Rblas DLL from CRAN, but the same thing happens with standard Rblas.
>>
>> __________________________________
>> Andy Jaworski
>> 518-1-01
>> Process Laboratory
>> 3M Corporate Research Laboratory
>> -----
>> E-mail: apjaworski at mmm.com
>> Tel: (651) 733-6092
>> Fax: (651) 736-3122
>>
>>
>>
>> "C.J.Albers"
>> <C.J.Albers at open.
ac.uk> To
>> Sent by: <r-help at stat.math.ethz.ch>
>> r-help-bounces at st cc
>> at.math.ethz.ch
>> Subject
>> [R] R crashes during 'eigen'
>> 03/28/2006 10:01
>> AM
>>
>>
>>
>>
>>
>>
>>
>>
>> Hi all,
>>
>> Hi,
>>
>> When I want to compute the eigenvalues & eigenvectors of a specific
>> matrix, R crashes (i.e. it stops responding to any input). I've tried it
>> with different versions of R (2.1.1, 2.2.0, 2.2.1) - all with crashing
>> as result.
>>
>> What I did before the crash was:
>>
>> M <- as.matrix(read.table("thematrix",header=T))
>> eigen(M)
>>
>> If, instead of eigen(M), I use eigen(M, EISPACK=T), R doesn't crash. So,
>> I know a workaround my problem, but still don't understand why R
>> crashes. Could anyone explain this?
>> In case someone wants to download my matrix to see where it goes wrong,
>> it can be downloaded from http://mcs.open.ac.uk/cja235/thematrix
>> (warning: obviously, R might crash so save your unsaved work first).
>>
>> thanks,
>> Casper Albers
>>
>>
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide!
>> http://www.R-project.org/posting-guide.html
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>>
Simon> ______________________________________________
Simon> R-help at stat.math.ethz.ch mailing list
Simon> https://stat.ethz.ch/mailman/listinfo/r-help
Simon> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list