p.screeplot.princomp {cwhmisc} | R Documentation |
p.screeplot.princomp
plots a screeplot with labels of cumulative variances
p.screeplot.princomp(object, variables=seq(length(object$sdev)), cumulative=TRUE, main=deparse(substitute(object)), ylim=c(0,max(vars)+0.05),...)
object |
an object of class "princomp" created by princomp |
variables |
a vector of integers selecting the elements of $object\$sdev^2$. |
cumulative |
a logical value. If FALSE, the labels on bars show variances. If TRUE, they show cumulative variances. |
main |
overall title for the plot. |
ylim |
limits for the y axis. |
... |
optional arguments for barplot |
A numeric vector (or matrix, when beside = TRUE), say mp, giving the coordinates of all the bar midpoints drawn, useful for adding to the graph.
Christian W. Hoffmann, c-w.hoffmann@sunrise.ch,
http://www.wsl.ch/personal_homepages/hoffmann/index_EN
library(stats) m <- cbind(rnorm(100),rlnorm(100)) p.screeplot.princomp(princomp(m)) ## Not run: p.screeplot.princomp(princomp(m),main="Screeplot",ylab="Variances",cex=0.6)