Learn R Programming

dartR (version 0.80)

gl.dist: Calculate a distance matrix for populations defined in an {adegenet} genlight object

Description

This script calculates various distances between populations based on allele frequencies.

Usage

gl.dist(gl, method = "euclidean", binary = FALSE, diag = TRUE,
  upper = FALSE, p = NULL)

Arguments

gl

-- name of the genlight containing the SNP genotypes [required]

method

-- Specify distance measure [method=euclidean]

binary

-- Perform presence/absence standardization before analysis using decostand [binary=FALSE]

diag

-- Compute and display diagonal

upper

-- Return also upper triangle

p

-- The power of the Minkowski distance

Value

A matrix of distances between populations (class dist)

Details

The distance measure can be one of "manhattan", "euclidean", "canberra", "bray", "kulczynski", "jaccard", "gower", "altGower", "morisita", "horn", "mountford", "raup" , "binomial", "chao", "cao", "mahalanobis", "maximum", "binary" or "minkowski". Refer to the documentation for dist stats or vegdist vegan for definitions.

Examples

Run this code
# NOT RUN {
gl.dist(testset.gl, method="gower", diag=TRUE)
# }

Run the code above in your browser using DataLab