nucdivR: A function to calculate the average hamming distance within...

Description Usage Arguments Value Author(s) Examples

View source: R/nucdivR.R

Description

A function to calculate the average hamming distance within each two populations, between two populations and Fst statistic.

Usage

1
nucdivR(hapmatrix1, hapmatrix2)

Arguments

hapmatrix1

A haplotype matrix with ones (ancestral) and twos (derived).

hapmatrix2

The other haplotype matrix with ones (ancestral) and twos (derived).

Value

The average hamming distance within each two populations, between two populations and Fst statistic.

Author(s)

Fei Xiang ([email protected])

Examples

1
2
3
4
exmtx=matrix(sample(2,80,replace=T),ncol=10,nrow=8)
exmtx1=matrix(sample(2,80,replace=T),ncol=10,nrow=8)
nucdivR(exmtx,3-exmtx)
nucdivR(exmtx,exmtx1)

sdwfrost/popseq documentation built on Aug. 4, 2017, 7:21 p.m.