calcFst {stockR} | R Documentation |
Calculate Fst statistics for frequency data
Description
Calculates Weir and Cockerham's Fst for frequency data
Usage
calcFst(data, grps)
Arguments
You can put normal text in Arguments, too, like this. Remember to indent all arguments, as below.
data |
a nMarker by nAnimal matrix of allele frequencies. That is for animal i and codominant marker j data[j,i] is the number of copies of the SNP allele (0, 1, or 2). |
grps |
a numeric vector giving the populations of the nAnimals |
Details
This function is really just a wrapper for the Fstat()
function, taken from the (now unsupported) Geneland package.
Value
A numeric matrix containing the pairwise Fst values between all populations.
Authors
Arnaud Estoup for original code in Turbo Pascal. Translation in Fortran and interface with R by Gilles Guillot (for Geneland package). Scott Foster for latest wrapper for stockR package.
Author(s)
Scott D. Foster
Examples
set.seed(717)
data <- sim.stock.data( nAnimals=50, nSNPs=500, nSampleGrps=50, K=5, ninform=50)
calcFst( data, attributes( data)$grps)