p.screeplot.princomp {cwhmisc}R Documentation

Plot screeplot

Description

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

Usage

p.screeplot.princomp(object, variables=seq(length(object$sdev)), cumulative=TRUE, main=deparse(substitute(object)), ylim=c(0,max(vars)+0.05),...)

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, c-w.hoffmann@sunrise.ch,
http://www.wsl.ch/personal_homepages/hoffmann/index_EN

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 cwhmisc version 2.0.1 Index]