G_PCA: Plot the principal components of a genomic relationship...

View source: R/G_PCA.R

G_PCAR Documentation

Plot the principal components of a genomic relationship matrix

Description

This function takes a genomic relationship matrix (i.e. one generated by the A.mat function in rrBLUP), performs a singular value decomposition, and plots the designated principal components.

Usage

G_PCA(G, x.PC, y.PC, col = NULL, scree = FALSE, return.data = FALSE)

Arguments

G

A genomic relationship matrix of dimensions n x n, where n is the number of entries.

x.PC

The principal component to plot on the x-axis.

y.PC

The principal component to plot on the y-axis.

col

A factor of categories by which to color the plot of principal componts. Must be of length n.

scree

A logical indicating whether to display a scree plot.

return.data

A logical indicating whether to return the results of the singular value decomposition.


neyhartj/gws documentation built on Feb. 5, 2024, 12:42 a.m.