clean.genepop: Remove illegal characters from HexSim generated genepop input...

Description Usage Arguments Value

View source: R/genepop.utilities.R

Description

HexSim includes a 'structure block' at the end of its genepop input file that are not recognised by genepop. This block is removed by clean.genepop Also, while the animal IDs between brackets should not create a problem in genepop, these may be an 'unexpected column' for other applications that reads genepop input files (e.g. the R package diveRsity). Similarly, the space between the word 'Trait' and the trait number, and the equal and column symbols in the first line of the file can cause unexpected behaviours in some applications. All these unusual features are removed from the HexSim generated files, which are then re-saved with the same name, a suffix "cleaned" and an extensin ".gen".

Usage

1

Arguments

fname

A character vector with the name of the input file including the path

title

A character vector to be used to replace the first line in the file

Value

Save to disk a cleaned up genepop input file and a character vector


carlopacioni/HexSimR documentation built on Nov. 28, 2020, 4:12 p.m.