doPCA: Run a principal components analysis

Description Usage Arguments Value

View source: R/stats.R

Description

Run a principal components analysis

Usage

1
doPCA(gt, nPCs = 4)

Arguments

gt

A genotype matrix with N rows and L columns, where N is the number of individuals and L is the number of loci, for which the i,jth element gives the number of the counted allele in each individual at each locus.

nPCs

The number of principal component axes to retain. Default is 4.

Value

A matrix with N rows and nPCs columns giving the position of each of the N samples on the first nPCs principal component axes.


gbradburd/popgenstuff documentation built on Oct. 16, 2021, 12:05 a.m.