ggbiplot {rsvd}R Documentation

Biplot for rpca using ggplot.

Description

Creates a pretty biplot which is showing the individual factor map overlayed by the variables factor map, i.e, plotting both the principal component scores and directions.

Usage

ggbiplot(
  rpcaObj,
  pcs = c(1, 2),
  loadings = TRUE,
  groups = NULL,
  alpha = 0.6,
  ellipse = TRUE,
  alpha.ellipse = 0.2,
  var_labels = TRUE,
  var_labels.names = NULL,
  ind_labels = TRUE,
  ind_labels.names = NULL
)

Arguments

rpcaObj

Object returned by the rpca function.

pcs

Array_like.
An array with two values indicating the two PCs which should be used for plotting. By default the first two PCs are used, e.g., c(1,2).

loadings

Bool (TRUE, FALSE), optional.
If TRUE, the eigenvectors are unit scaled by the square root of the eigenvalues W = W * diag(sqrt(eigvals)).

groups

Factor, optional.
Factor indicating groups.

alpha

Scalar, optional.
Alpha transparency for scatter plot.

ellipse

Bool (TRUE, FALSE), optional.
Draw a 1sd data ellipse for each group, if TRUE.

alpha.ellipse

Scalar, optional.
Alpha transparency for ellipse.

var_labels

Bool (TRUE, FALSE), optional.
Plot variable names, if TRUE.

var_labels.names

Array_like, optional.
User specific labels for the individuals.

ind_labels

Bool (TRUE, FALSE), optional.
Plot data point names, if TRUE.

ind_labels.names

Array_like, optional.
User specific labels for data points.

Author(s)

N. Benjamin Erichson, erichson@berkeley.edu

See Also

rpca, ggplot

Examples

#See ?rpca

[Package rsvd version 1.0.5 Index]