rm(list=ls())  
ex7.2 <- read.table("例7-2new.txt", head=TRUE, fileEncoding="utf8")  
dat72 <- ex7.2[, -1]  
rownames(dat72) <- ex7.2[, 1]  
library(FactoMineR)  
fit_ca <- FactoMineR::CA(dat72, graph = FALSE)  
#方差解释  
fit_ca$eig  
#行主成分轮廓坐标  
FF <- fit_ca$row$coord  
#列主成分轮廓坐标  
GG <- fit_ca$col$coord  
#散点图  
plot(FF[, 1], FF[,2], xlab = "轮廓1", ylab="轮廓2", xlim=c(-0.8, 0.8), ylim=c(-0.3, 0.3))  
text(FF[, 1], FF[,2], rownames(dat72), adj=1.3)  
points(GG[, 1], GG[,2], pch=15)  
text(GG[, 1], GG[,2], colnames(dat72), adj=-0.2, col="red", cex=1.5) 












