sfsR: A function to calculate Tajima's D and Fay and WU's H...

Description Usage Arguments Value Author(s) Examples

View source: R/sfsR.R

Description

A function to calculate Tajima's D and Fay and WU's H statsitc given a haplotype matrix.

Usage

1
sfsR(hapmatrix)

Arguments

hapmatrix

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

Value

Tajima's D and Fay and WU's H statsitc.

Author(s)

Fei Xiang (xf3087@gmail.com)

Examples

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

sdwfrost/popseq documentation built on May 29, 2019, 4:23 p.m.