# NOT RUN {
if(require(adegenet)){
data(nancycats)
## pairwise Fst
mat.fst <- pairwise.fst(nancycats, res.type="matrix")
mat.fst
}
## Fst, Fis, Fit
## using hierfstat
if(require(hierfstat)){
fstat(nancycats)
}
## using pegas
if(require(pegas)){
data(nancycats)
## conversion to pegas's format
as.loci(nancycats)
## use Fst from pegas
fsttab <- Fst(as.loci(nancycats))
## average over loci
apply(fsttab, 2, mean)
}
# }
Run the code above in your browser using DataLab