ggbiplot.princomp: ggplot biplot function for princomp objects

Description Usage Arguments Value See Also Examples

Description

ggplot biplot function for princomp objects

Usage

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

Arguments

PC

a fitted object from princomp (from stats package)

selected.pc

number of two principle components

obsnames

name assigned to each point

scale

scaling for explanatory variable arrows

...

other arguments to be passed to qplot

Value

a ggplot object

See Also

princomp

Examples

1
2
3
4
5
p <- ggbiplot.princomp(PC=princomp(iris[,-5]),
                   selected.pc=c(1,2),
                   obsnames=iris[,5],
                   main="PCA of iris dataset")
print(p)

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