Learn R Programming

HWxtest (version 1.1.9)

genepop.to.genind: Imports a .txt file in GenePop format into an object of type genind

Description

The main work is done by the function adegenet::read.genepop. However, that function requires text files with an extension of .gen, whereas such files usually have extension .txt. The sole purpose of this function is to work around the “.gen” requirement.

Usage

genepop.to.genind(name, quiet = TRUE, ncode = 3)

Arguments

name

the name of a file in GenePop format

quiet

whether a conversion message should be printed

ncode

Set to the number of characters per allele name

Value

an object of class genind