data(iris) par(mfrow=c(2,2)) PCA1<-prcomp(iris[,1:4],center = TRUE,scale. =TRUE) biplot(PCA1) PCA_log <- prcomp(log(iris[,1:4]),center = TRUE,scale. =TRUE) biplot(PCA_log) ## install.packages("ggfortify") library(ggplot2) library(ggfortify) pca2_plot<-autoplot(PCA1,data=iris,colour='Species') pca2_plot