ggplot_pca: Ggplot a qb_pca object

Description Usage Arguments Value Author(s)

View source: R/ggplots.R

Description

Ggplot a qb_pca object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
ggplot_pca(
  pca,
  group = NULL,
  axes = c(1, 2),
  obs = TRUE,
  obs_sup = FALSE,
  vars = FALSE,
  vars_sup = FALSE,
  pc_variance = TRUE,
  ellipses = FALSE,
  label = NULL,
  link = FALSE,
  alpha_fill = FALSE,
  ellipses_ci = 0.95,
  nas_first = TRUE,
  ...
)

Arguments

pca

pca or qb_pca object (which is fortified)

group

Column index or name of qb_pca$data for the grouping of observations. Default: NULL

axes

Two principal component axes to plot. Default: 1:2

obs

Character identifiers of active observations to use. If TRUE no subset. If FALSE none are used. Default: TRUE

obs_sup

Character identifiers of suppl. observations to use. If TRUE no subset. If FALSE none are used. Default: FALSE

vars

Character identifiers of active variables to use. If TRUE no subset. If FALSE none are used. Default: FALSE

vars_sup

Character identifiers of suppl. variables to use. If TRUE no subset. If FALSE none are used. Default: FALSE

pc_variance

Logical, displays the variance ratio along the axis names

ellipses

Should ellipses be plotted ? Not used if groups is NULL. Default: FALSE

label

name of column to be used for labelling observation. Can be a supplementary variable or "PCx". By default (NULL), no labels are shown.

link

if TRUE a line is drawn between the observations of the same group. This is useful to identify linked observations

alpha_fill

Logical, should also use alpha to discriminate active and additional observations ? Default: FALSE

ellipses_ci

Confidence interval ratio of the ellipses. Not used if ellipses is FALSE. Default: .95

nas_first

Logical, rearranges data frame to put NAs in groups first

...

Passed to draw_pca_vars

Value

ggplot object

Author(s)

tcharlon


ThomasChln/snpclust documentation built on June 11, 2020, 4:27 p.m.