[R] order by which the eigenvalues are presented

Luis Borda de Agua lbagua at gmail.com
Tue May 5 19:49:42 CEST 2015

I’m using R 3.1.3 in OS X 10.10.3 (Yosemite)

I use the function “eigen” to calculate the eigenvalues of matrix where each element is sampled from a given distribution (normal, beta, etc.). 
According to the information provided: 
a vector containing the p eigenvalues of x, sorted in decreasing order, according to Mod(values)"

However, for my purposes it would be important to “fix” the order by which the eigenvalues are presented. To be more specific, I would like to know each time I calculated the eigenvalues from a set of sampled matrix elements which is the eigenvalue that provides the largest (or the smallest) real part.

Is there an easy way to enforce this? (I could not find an option in "eigen".)

Is there another function in R that calculates the eigenvalues and shows their values without sorting them?

Thank you in advance,

Luís Borda de Água

	[[alternative HTML version deleted]]

More information about the R-help mailing list