Plots either the first 2 or 3 principal components.

plot_pca(
  pca,
  num_components = 2,
  col = NULL,
  col_palette = NULL,
  ggplot = FALSE
)

Arguments

pca

output of pca_wsaf() function.

num_components

numeric for number of components used. Default = 2.

col

vector by which samples are coloured.

col_palette

vector of colours for each group.

ggplot

boolean for plotting using ggplot. Default = FALSE