pca_plot: PCA Plot

Description Usage Arguments Details Value Author(s) Examples

View source: R/pca_plot.R

Description

Creates a PCA plot

Usage

1
2
3
4
5
6
7
8
9
pca_plot(
  data,
  xComponent = "PC1",
  yComponent = "PC2",
  legendPos = "right",
  soft = "PLINK",
  colPalette = "Accent",
  title = NULL
)

Arguments

data

PLINK pca or EIGENSTRAT smartpca output, (or any tab-delimited file or data.frame with the same format as PLINK pca or EIGENSTRAT smartpca output)

xComponent

A character vector indicating the principal component value to use for the x-axis. Default is "PC1"

yComponent

A character vector indicating the principal component value to use for the x-axis. Default is "PC2"

legendPos

A character vector indicating the legend position. Default is "right".

soft

A character vector indicating the software output format. Default is "PLINK". If you have a tab-delimited file or data.frame with the same format as EIGENSTRAT output, use "EIGENSTRAT"

colPalette

A character vector indicating the color palette to use. Default is "Accent".

title

A string denoting the title to use for the plot. Default is 'PCA Plot'

Details

Creates a PCA plot from PLINK pca output, EIGENSTRAT smartpca, (or any tab-delimited file or data.frame with the same format as PLINK pca or EIGENSTRAT smartpca output).

Value

A PCA plot.

Author(s)

Lindokuhle Nkambule

Examples

1

gwaRs documentation built on April 20, 2021, 1:07 a.m.