utils.collapse.matrix: Collapses a distance matrix calculated for individuals to a...

View source: R/utils.collapse.matrix.r

utils.collapse.matrixR Documentation

Collapses a distance matrix calculated for individuals to a distance matrix for populations defined in a dartR genlight object

Description

WARNING: UTILITY SCRIPTS ARE FOR INTERNAL USE ONLY AND SHOULD NOT BE USED BY END USERS AS THEIR USE OUT OF CONTEXT COULD LEAD TO UNPREDICTABLE OUTCOMES.

Usage

utils.collapse.matrix(D, x, verbose = NULL)

Arguments

D

Name of the matrix containing the distances between individuals [required].

x

Name of the genlight object containing the genotypes [required].

verbose

Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default 2].

@details This script takes a matrix of distances calculated between individuals and collapses it by averaging to a matrix of distances between populations. The script gl.dist.ind has a lot of options for distances for presence absence data, but gl.dist.pop does not. This script allows efficient and consistent transfer of this capability to gl.dist.pop.

Value

An object of class 'dist' or 'matrix' giving distances between individuals

Author(s)

Author: Arthur Georges. Custodian: Arthur Georges – Post to https://groups.google.com/d/forum/dartr

See Also

Other utilities: gl.alf(), utils.check.datatype(), utils.dart2genlight(), utils.dist.binary(), utils.flag.start(), utils.hamming(), utils.het.pop(), utils.impute, utils.is.fixed(), utils.jackknife(), utils.n.var.invariant(), utils.plot.save(), utils.read.fasta(), utils.read.ped(), utils.recalc.avgpic(), utils.recalc.callrate(), utils.recalc.freqhets(), utils.recalc.freqhomref(), utils.recalc.freqhomsnp(), utils.recalc.maf(), utils.reset.flags(), utils.transpose(), utils.vcfr2genlight.polyploid()


dartR.base documentation built on April 4, 2025, 2:45 a.m.