#新規作図ウィンドウを開く windows() #第二主成分までの主成分負荷量を散布図に表示. plot(pcloadings[,1:2],type="n",xlab="PC 1", ylab="PC 2",cex.axis=0.8,cex.lab=0.8) points(pcloadings[,1:2],col="blue",pch="*",cex=2) text(pcloadings[,1:2], labels=colvar,cex=0.9,adj=c(0.25,1.5)) abline(h=0,lty="dotted"); abline(v=0,lty="dotted") title(main="Principal Component Analysis: PC Loadings") #新規作図ウィンドウを開く windows() #第二主成分までの主成分得点を散布図に表示. plot(pcscores[,1:2],xlab="PC 1", ylab="PC 2",type="n",cex.axis=0.8,cex.lab=0.8) points(pcscores[,1:2],col="red",pch="*",cex=2) text(pcscores[,1:2], labels=rowvar,cex=0.9,adj=c(0.25,1.5)) abline(h=0,lty="dotted"); abline(v=0,lty="dotted") title(main="Principal Component Analysis: PC Scores")