Learn R Programming

dartR (version 1.1.11)

gl.pcoa.pop: PCoA ordination of populations

Description

This script takes the data on allele frequencies for populations and undertakes a Gower PCoA ordination using a nominated distance measure. It draws population information and calculates gene frequencies by drawing upon data in the original genlight {adegenet} object (entity x attribute matrix). The script is essentially a wrapper for pcoa() {ape}.

Usage

gl.pcoa.pop(gl, c = "none", method = "euclidean")

Arguments

gl

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

c

-- Correction methods for negative eigenvalues: \"lingoes\" and \"cailliez\" Refer to {ape} documentation. [default \"none\"]

method

-- the distance measure to be used. This must be one of "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski". Any unambiguous substring can be given.

Value

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

Examples

Run this code
# NOT RUN {
pcoa <- gl.pcoa.pop(testset.gl)
pcoa <- gl.pcoa.pop(testset.gl, c="cailliez", m="minkowski")
# }

Run the code above in your browser using DataLab