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 (xf3087@gmail.com)

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 May 29, 2019, 4:23 p.m.