ggbiplot.prcomp: ggplot biplot function for prcomp objects

Description Usage Arguments Value See Also Examples

Description

ggplot biplot function for prcomp objects

Usage

1
2
3
## S3 method for class 'prcomp'
ggbiplot(PC, selected.pc = c(1, 2), groups = NULL,
  scale = 1, length.alpha = T, ...)

Arguments

PC

a fitted object from prcomp (from stats package)

selected.pc

number of two principle components

groups

group assigned to each point

scale

scaling for explanatory variable arrows

...

other arguments to be passed to qplot

Value

a ggplot object

See Also

prcomp

Examples

1
2
3
4
p <- ggbiplot.prcomp(PC=prcomp(iris[,-5]))
print(p)
#'p <- ggbiplot.prcomp(PC=prcomp(iris[,-5]), iris[,5])
print(p)

low-decarie/ggpca documentation built on May 21, 2019, 7:50 a.m.