PCbiplot: Biplot from a principal components analysis (PCA)

Description Usage Arguments Value

Description

Biplot from a principal components analysis (PCA)

Usage

1
2
PCbiplot(PC, d, colors, legend_t, varnames, labels, title, x = "PC1",
  y = "PC2")

Arguments

PC

a prcomp object obtained by conducting a principal components analysis.

d

a data frame of metadata containing the sample identifiers and categorical classification of the samples.

colors

a character vector of same length as the number of levels in the classfication.

legend_t

the name of the column in d that gives the sample classification.

varnames

a character vector of names for the variables in the biplot.

labels

a logical indicating whether samples should be labelled.

title

a title for the biplot.

x

principal component to be plotted along the horizontal (x) axis or abcissa.

y

principal component to be plotted along the vertical (y) axis or ordinate.

Value

A ggplot2 object


ssinari/smisc documentation built on June 6, 2019, 7:55 a.m.