Peter Dalgaard wrote: > >>> Is it possible to get unordered eigenvalues and eigenvectors of a >>> symmetric matrix in R? >> >> Yes, see help("eigen"). > > Er, where do you see anything about (un)order? As far as I know, > there's no "natural" ordering of eigenvalues and eigenvalue > algorithms generally find them in either increasing or decreasing > order (or closest to specified value). > "eigen" orders the values. From help("eigen"):
values: a vector containing the p eigenvalues of 'x', sorted in _decreasing_ order, according to 'Mod(values)' in the asymmetric case when they might be complex (even for real matrices). For real asymmetric matrices the vector will be complex only if complex conjugate pairs of eigenvalues are detected. So, if you are strict about getting unordered eigenvalues, you must shuffle them :-) Alberto Monteiro ______________________________________________ R-help@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 and provide commented, minimal, self-contained, reproducible code.