plotld(x, npc=3, main="Loadings", lty=1, lwd=4 / 1:npc, col=gray(0:(npc-1) / npc), ylim=range(loadings), abs.=FALSE, cex=.8, ylab=if(abs.) "abs(loading)" else "loading", legend.x=NULL, legend.y=NULL)
princomp
.
3
.
"Loadings"
.
1
.
4 / 1:npc
.
gray(0:(npc-1) / npc)
.
range(loadings)
.
FALSE
.
.8
.
"loading"
.
NULL
, meaning automatic.
For no legend, use an out-of-range legend.x
or legend.y
.
princomp
,
plotpc
data(iris)
x <- iris[, -5] # -5 to drop Species
plotld(x)
Run the code above in your browser using DataLab