Learn R Programming

dartR (version 1.1.11)

gl.pcoa: PCoA ordination (glPca)

Description

This script takes the data on SNP genotypes for individuals and undertakes a Gower PCoa ordination using Euclidean distance and drawing upon data in the original genlight {adegenet} object (entity x attribute matrix). The script is essentially a wrapper for glPca() {adegenet} with default settings apart from setting parallel=FALSE and converting the eigenvalues to percentages.

Usage

gl.pcoa(gl, nfactors = 5, parallel = FALSE, n.cores = 16, v = TRUE)

Arguments

gl

Name of the genlight object containing the SNP genotypes by specimen and population [required]

nfactors

Number of dimensions to retain in the output file [default 5]

parallel

TRUE if parallel processing is required (does fail under Windows) [default FALSE]

n.cores

Number of cores to use if parallel processing is requested [default 16]

v

-- verbose if TRUE, silent if FALSE [default TRUE]

Value

An object of class glPca containing the eigenvalues, factor scores and factor loadings

Examples

Run this code
# NOT RUN {
pcoa <- gl.pcoa(testset.gl, nfactors=3)
# }

Run the code above in your browser using DataLab