Learn R Programming

dartR (version 0.80)

gl2phylip: Create a Phylip input distance matrix from a genlight (SNP) or genind (SilicoDarT) {adegenet} object

Description

This function calculates and returns a matrix of Euclidean distances between populations and produces an input file for the phylogenetic program Phylip (Joe Felsenstein).

Usage

gl2phylip(gl, outfile = "phyinput.txt", bstrap = 1)

Arguments

gl

Name of the genlight object containing the SNP data or a genind object containing presence absence data [required]

outfile

Name of the file to become the input file for phylip [default phyinput.txt]

bstrap

Number of bootstrap replicates [default 1]

Value

Matrix of Euclidean distances between populations

Examples

Run this code
# NOT RUN {
result <- gl2phylip(testset.gl, outfile="test.txt", 1000)
# }

Run the code above in your browser using DataLab