p.screeplot.princomp {cwhplot}R Documentation

Plot screeplot

Description

p.screeplot.princomp plots a screeplot with labels of cumulative variances

Arguments

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

Value

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.

Author(s)

Christian W. Hoffmann, christian.hoffmann@wsl.ch, newline http://www.wsl.ch/staff/christian.hoffmann

Examples

  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)

[Package cwhplot version 2.0 Index]