# # spearman_eig.r -- Simple Eigenvalue-Eigenvector Extraction # of Spearman's 1904 Matrix # # Original Data -- Spearman R's # #Classics 1.00 .83 .78 .70 .66 .63 #French .83 1.00 .67 .67 .65 .57 #English .78 .67 1.00 .64 .54 .51 #Math .70 .67 .64 1.00 .45 .51 #Pitch .66 .65 .54 .45 1.00 .40 #Music .63 .57 .51 .51 .40 1.00 # TT <- matrix(scan("D:/R_Files/spearman_2.txt",0),ncol=6,byrow=TRUE) Spearmanrs <- read.csv("D:/R_Files/spearman.txt",header=F,row.names=1) attach(Spearmanrs) ev <- eigen(TT) DIMNEW.1 <- ev$vec[,1] DIMNEW.2 <- ev$vec[,2] plot(DIMNEW.1,DIMNEW.2,main="First Two Eigenvectors\nSpearman Correlation Matrix", xlab="First Dimension",ylab="Second Dimension", xlim=c(-1.0,1.0),ylim=c(-1.0,1.0),pch=16,col="blue") text(DIMNEW.1,DIMNEW.2,labels=row.names(Spearmanrs),adj=0)