Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

read.genepop

Reading data from Genepop


Description

The function read.genepop reads Genepop data files (.gen) and convert them into a genind object.

Usage

read.genepop(file, ncode = 2L, quiet = FALSE)

Arguments

file

a character string giving the path to the file to convert, with the appropriate extension.

ncode

an integer indicating the number of characters used to code an allele.

quiet

logical stating whether a conversion message must be printed (TRUE,default) or not (FALSE).

Details

Note: read.genepop is meant for DIPLOID DATA ONLY. Haploid data with the Genepop format can be read into R using read.table or read.csv after removing headers and 'POP' lines, and then converted using df2genind.

Value

an object of the class genind

Author(s)

Thibaut Jombart t.jombart@imperial.ac.uk

References

Raymond M. & Rousset F, (1995). GENEPOP (version 1.2): population genetics software for exact tests and ecumenicism. J. Heredity, 86:248-249

See Also

Examples

obj <- read.genepop(system.file("files/nancycats.gen",package="adegenet"))
obj

adegenet

Exploratory Analysis of Genetic and Genomic Data

v2.1.3
GPL (>= 2)
Authors
Thibaut Jombart [aut] (<https://orcid.org/0000-0003-2226-8692>), Zhian N. Kamvar [aut, cre] (<https://orcid.org/0000-0003-1458-7108>), Caitlin Collins [ctb], Roman Lustrik [ctb], Marie-Pauline Beugin [ctb], Brian J. Knaus [ctb], Peter Solymos [ctb], Vladimir Mikryukov [ctb], Klaus Schliep [ctb], Tiago Maié [ctb], Libor Morkovsky [ctb], Ismail Ahmed [ctb], Anne Cori [ctb], Federico Calboli [ctb], RJ Ewing [ctb], Frédéric Michaud [ctb], Rebecca DeCamp [ctb], Alexandre Courtiol [ctb] (<https://orcid.org/0000-0003-0637-2959>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.