slplot,pcaRes-method {pcaMethods} | R Documentation

## Side by side scores and loadings plot

### Description

A common way of visualizing two principal components

### Usage

    slplot(object, pcs=c(1,2), scoresLoadings=c(TRUE, TRUE),
    sl="def", ll="def", hotelling=0.95, rug=TRUE, sub=NULL,...)

### Arguments

`object` | a pcaRes object
`pcs` | which two pcs to plot
`scoresLoadings` | Which should be shown scores and or loadings
`sl` | labels to plot in the scores plot
`ll` | labels to plot in the loadings plot
`hotelling` | confidence interval for ellipse in the score plot
`rug` | logical, rug x axis in score plot or not
`sub` | Subtitle, defaults to annotate with amount of explained variance.
`...` | Further arguments to plot functions. Prefix arguments to `par()` with 's' for the scores plot and 'l' for the loadings plot. I.e. cex become scex for setting character expansion in the score plot and lcex for the loadings plot.

### Details

This method is meant to be used as a quick way to visualize results, if you want a more specific plot you probably want to get the scores, loadings with `scores(object)`, `loadings(object)` and then design your own plotting method.

### Value

None, used for side effect.

### Note

Uses layout instead of par to provide side-by-side so it works with Sweave (but can not be combined with `par(mfrow=..))`

### Author(s)

Henning Redestig

### See Also

`pca`, `biplot`

### Examples

    data(iris)
    pcIr <- pca(iris[,1:4], scale="uv")
    slplot(pcIr, sl=NULL, spch=5)
    slplot(pcIr, sl=NULL, lcex=1.3, scol=as.integer(iris[,5]))

[Package pcaMethods version 1.79.1 Index]