Learn R Programming

AFLPsim (version 0.4-2)

sim2newhybrids: Converting hybridsim object to a NewHybrids input file

Description

The function sim2newhybrids converts a AFLPsim object into a NewHybrids input file.

Usage

sim2newhybrids(x,filename)

Arguments

x
a hybridsim object
filename
a character string indicating the name of the output file

Value

  • a NewHybrids input file

encoding

latin1

References

Anderson, E.C. 2008. Bayesian inference of species hybrids using multilocus dominant genetic markers. Philosophical transactions of the Royal Society of London. Series B, Biological Sciences 363: 2841-2850.

Anderson, E.C., & E.A. Thompson. 2002. A model-based method for identifying species hybrids using multilocus genetic data. Genetics 160: 1217-1229.

See Also

sim2arlequin sim2bayescan sim2introgress sim2popgene sim2structure

Examples

Run this code
## simulate hybrids
hybrids<-hybridsim(Nmarker=100,Na=30,Nb=30,Nf1=30, type="neutral", hybrid="all")

## convert to NewHybrids input file
sim2newhybrids(hybrids,filename="newhybridsinput.txt")

Run the code above in your browser using DataLab