Skip to contents

Plot pairs of principal components and highlight indicated outliers. Each point is a sample.

Usage

plot_pcs(pcA, pcB, pcax, outliers, pca, title = NULL)

Arguments

pcA

character, PC for x-axis, e.g. "PC1"; also a column name in pcax

pcB

character, PC for y-axis, e.g. "PC2"; also a column name in pcax

pcax

e.g., prcomp(data)$x

outliers

vector of viallabels corresponding to PC outliers

pca

result returned by prcomp()

title

optional character, plot title

Value

ggplot object