manipulation {genepop}R Documentation

Various data manipulation utilities

Description

Various procedures described in the linked sections of the Genepop executable documentation: diploidize haploid data, relabel_alleles, sample_haploid, and pop_to_indiv. The latter procedure converts population samples (several individuals in each population) to individual data. The names given to the individuals in the new file created (names which are to be interpreted as coordinates in a spatial analysis) may be the population coordinates (given as the name of the last individual in the original data file), or each individual's coordinates (given as the name of each individual in the original data file).

Usage

diploidize(inputFile, outputFile = "", verbose = interactive())

relabel_alleles(inputFile, outputFile = "", verbose = interactive())

pop_to_indiv(inputFile, coordinates, outputFile = "", verbose = interactive())

sample_haploid(inputFile, outputFile = "", verbose = interactive())

Arguments

inputFile

The path of the input file, in Genepop format

outputFile

character: The path of the output file

verbose

logical: whether to print some information

coordinates

character: either 'population' (to use population coordinates) or any other charater string (to use individual coordinates).

Examples

locinfile <- genepopExample('sample.txt')
outfile <- diploidize(inputFile = locinfile,outputFile="Dsample.txt")
if ( ! interactive()) clean_workdir(c("sample.txt", "Dsample.txt"))

[Package genepop version 1.2.2 Index]