[R] fast partial spectral decompositions.

Jon McAuliffe jon at mcauliffe.com
Fri Nov 5 21:35:03 CET 2004


hello,

i want to compute the top k eigenvalues+eigenvectors of a (large)
real symmetric matrix. since it doesn't look like any top-level R
function does this, i'll call LAPACK from a C shlib and then
use .Call. the only LAPACK function i see to do this in
R_ext/Lapack.h is dsyevx. however, i know that in LAPACK dsyevr
can also return a partial eigendecomposition. why is dsyevr not
exported in R_ext/Lapack.h? my superficial understanding is that
dsyevr is "better" (faster? stabler?) for both complete and
partial eigenproblems than dsyevd/dsyevx, but only the complete
eigenproblem interface to dsyevr appears to be exported in
Lapack.h (as dsyev).

corrections to misunderstandings in the above are welcome. advice
on whether using dsyevr rather than dsyevx is (very) important
for partial decompositions is also gratefully accepted.

please include jon at mcauliffe.com in the reply.

jon.




More information about the R-help mailing list