When running cor() on a times series with a lot of variables, I get a table back that has a row and column for each variable, showing the correlation between them.
How can I view this table as a list from most correlated to least correlated (eliminating all NA results and results that map back to themselves (i.e. the correlation of A to A)). I would also like to count inverse (negative) results as absolute values, but still show them as negative.
So the desired output would be something like:
A,B,0.98
A,C,0.9
C,R,-0.8
T,Z,0.5
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…