PrepareData: Prepare a structure file (or similar data table) for...

View source: R/PrepareData.R

PrepareDataR Documentation

Prepare a structure file (or similar data table) for differential introgression analysis using gghybrid.

Description

Prepare a structure file (or similar data table) for differential introgression analysis using gghybrid.

Usage

PrepareData(Data, numprecol, missingval, onerow, numinds, S0.id, S1.id)

Arguments

Data

Character string defining the structure or data table to read in.

numprecol

Numeric, the number of columns preceding the genetic data.

missingval

Numeric or character, The value for indicating missing data.

onerow

Numeric, (0 or 1). Whether or not there is a single row per individual. Currently, HybridFindR only supports 0.

numinds

Numeric, the number of individuals in your data file.

S0.id

Character, the label for the S0 parental population.

S1.id

Character, the label for the S1 parental population.

Value

Returns a genotype table based on the number of copies of the S1 allele in each individual at each marker.

References

Bailey R. (2020) gghybrid: R package for evolutionary analysis of hybrids and hybrid zones.10.5281/zenodo.3676499

Examples

## Not run: 
Data <- PrepareData('mystructurefile.csv', numprecol = 2, missingval = 'NA',
onerow = 0, numinds = 73, S0.id = 'P', S1.id = 'K')
## End(Not run)

kfarleigh/HybridFindR documentation built on Jan. 29, 2024, 11:39 p.m.