hierfstat (version 0.04-14)

read.fstat.data: Reads data from a FSTAT file

Description

Imports a FSTAT data file into R. The data frame created is made of nl+1 columns, nl being the number of loci. The first column corresponds to the Population identifier, the following columns contains the genotypes of the individuals.

Usage

read.fstat.data(fname, na.s = c("0","00","000","0000","00000","000000","NA"))

Arguments

fname
a file in the FSTAT format (http://www.unil.ch/popgen/softwares/fstat.htm): The file must have the following format: The first line contains 4 numbers: the number of samples, np , the number of loci, nl, the highest n
na.s
The strings that correspond to the missing value. You should note have to change this

Value

  • a data frame containing the desired data, in a format adequate to pass to varcomp

References

Goudet J. (1995). FSTAT (Version 1.2): A computer program to calculate F- statistics. Journal of Heredity 86:485-486 Goudet J. (2005). Hierfstat, a package for R to compute and test variance components and F-statistics. Molecular Ecology Notes. 5:184-186

Examples

Run this code
read.fstat.data(paste(path.package("hierfstat"),"/extdata/diploid.dat",sep="",collapse=""))

Run the code above in your browser using DataLab