This function converts the genetic data of an ecogen object into a Genepop input file.

ecogen2genepop(eco, dir = "", outName = "infile.genepop.txt", grp = NULL,
  nout = 3, sep = "")

Arguments

eco

Object of class "ecogen".

dir

output path. Default = "" (current directory).

outName

The name of the output file.

grp

The name of the S slot column with groups in which the sample must be divided (e.g., populations). If groups are not given (grp = NULL), all individuals will be assigned to a single one.

nout

Number of digits in the output file

sep

Character separating alleles.

Value

A Genepop file in the working directory.

Examples

# NOT RUN { data(eco.test) ecogen2genepop(eco, dir = "", outName = "infile.genepop.txt", grp = "pop") # an output file "infile.genepop.txt" is generated in the working directory # }