This function allows you to import a GENEPOP format file into R. Population names can be specified in the argument. See http://genepop.curtin.edu.au/help_input.html for details about GENEPOP format.
This function returns a list comprising three elements. 1. YOU_NAME_IT$DataMatrix: A matrix of genetic data with a population name label ($popNameVector) in the last column. 2. YOU_NAME_IT$SampleID: A vector of sample ID. 3. YOU_NAME_IT$LocusName: A vector of locus name.
Arguments
x
GENEPOP file or path to the file. The filename extension (e.g., .txt) should be included.
pop.names
A character string vector for population names. The order of the name should be the same with the order (top to down) in your GENEPOP file.
haploid
A logical variable (TRUE or FALSE) to specify whether your dataset is haploid data. Default is FALSE.
pos
A parameter for program development use; users can ignore it.
References
Rousset, F. 2008. Genepop'007: a complete reimplementation of the Genepop software for Windows and Linux. Mol. Ecol. Resources 8: 103-106