Learn R Programming

dartR.base (version 1.0.5)

gl.prop.shared: Calculates a similarity (distance) matrix for individuals on the proportion of shared alleles @family distance

Description

This script calculates an individual based distance matrix. It uses an C++ implementation, so package Rcpp needs to be installed and it is therefore really fast (once it has compiled the function after the first run).

Usage

gl.propShared(x)

Value

A similarity matrix

Arguments

x

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

Author

Bernd Gruber (Post to https://groups.google.com/d/forum/dartr)

Examples

Run this code
#takes some time at the first run of the function...
# \donttest{
res <- gl.propShared(bandicoot.gl)
res[1:5,1:7] #show only a small part of the matrix
# }

Run the code above in your browser using DataLab