## examples of 'pcaplot'
data(iris)
pcaplot(iris[,1:4], iris[,5],pcs=c(2,1),ep=2)
## change confidence interval (see 'panel.elli.1')
pcaplot(iris[,1:4], iris[,5],pcs=c(1,2),ep=2, conf.level = 0.9)
pcaplot(iris[,1:4], iris[,5],pcs=c(2,1),ep=1,
auto.key=list(space="top", columns=3))
pcaplot(iris[,1:4], iris[,5],pcs=c(1,3,4))
tmp <- pcaplot(iris[,1:4], iris[,5],pcs=1:3,ep=2)
tmp
## change symbol's color, type and size
pcaplot(iris[,1:4], iris[,5],pcs=c(2,1),main="IRIS DATA", cex=1.2,
auto.key=list(space="right", col=c("black","blue","red"), cex=1.2),
par.settings = list(superpose.symbol = list(col=c("black","blue","red"),
pch=c(1:3))))
## compare pcaplot and pca.plot.
pcaplot(iris[,1:4], iris[,5],pcs=c(1,2),ep=2)
pca.plot(iris[,1:4], iris[,5], ep.plot = TRUE)
## an example of 'pca.comp'
pca.comp(iris[,1:4], scale = TRUE, pcs=1:3)
Run the code above in your browser using DataLab