plot.pca.result: Auto-plotting of a PCA result

Description Usage Arguments Value

Description

Auto-plotting of a PCA result

Usage

1
2
3
4
## S3 method for class 'pca.result'
plot(x, K = c(1, 2), screeplot = FALSE,
  show = c("points", "labels", "nothing"), theme.fn = ggplot2::theme_bw,
  ...)

Arguments

x

a pca.result object

K

numeric vector of length 2 specifing which PCs to plot against each other; first is on x-axis and second on y-axis

screeplot

logical; if TRUE, show both the plot of two PCs against each other and the variances explained of all available PCs

show

length-1 character vector; show just points, or sample IDs. Use "nothing" to have all the aesthetics and axes set, but not actually draw anything.

theme.fn

a ggplot2-compatible function to specify formatting

...

ignored

Value

if screeplot = FALSE, a ggplot; if screeplot = TRUE, a gtable::gtable object which can be modified or re-rendered with grid::grid.draw().


andrewparkermorgan/argyle documentation built on May 10, 2019, 11:08 a.m.