Learn R Programming

FinePop (version 1.1.1)

GstN: Nei's Gst.

Description

This function estimates pairwise Gst among subpopulations (Nei 1973).

Usage

GstN(popdata)

Arguments

popdata
Population data object created by read.genepop function from a GENEPOP file (Rousset 2008).

Value

Matrix of estimated pairwise Gst.

References

Nei M (1973) Analysis of Gene Diversity in Subdivided Populations. Proc. Nat. Acad. Sci., 70, 3321-3323. Rousset F (2008) Genepop'007: a complete reimplementation of the Genepop software for Windows and Linux. Mol. Ecol. Resources, 8, 103-106.

See Also

read.genepop

Examples

Run this code
# data
data(data.JSM)
cat(data.JSM$genepop, file="JSM_genepop.txt", sep="\n")
cat(data.JSM$popname, file="JSM_popname.txt", sep=" ")
popdata <- read.genepop(genepop="JSM_genepop.txt", popname="JSM_popname.txt")

# Gst estimation
result.gst <- GstN(popdata)
write.csv(result.gst, "result_Gst.csv", na="")

Run the code above in your browser using DataLab