calcFst | R Documentation |
Calculates Weir and Cockerham's Fst for frequency data
calcFst(data, grps)
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 |
This function is really just a wrapper for the Fstat()
function, taken from the (now unsupported) Geneland package.
A numeric matrix containing the pairwise Fst values between all populations.
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.
Scott D. Foster
set.seed(717)
data <- sim.stock.data( nAnimals=50, nSNPs=500, nSampleGrps=50, K=5, ninform=50)
calcFst( data, attributes( data)$grps)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.