Last data update: 2014.03.03

R: Converting hybridsim object to a PopGene input file
sim2popgeneR Documentation

Converting hybridsim object to a PopGene input file

Description

The function sim2popgene converts a hybridsim object into a PopGene input file.

Usage

sim2popgene(x,filename)

Arguments

x

a hybridsim object

filename

a character string indicating the name of the output file

Value

a PopGene input file

Author(s)

F. Balao fbalao@us.es, J.L. García-Castaño

References

Yeh, F.C., R.C. Yang, T.B.J. Boyle, Z.H. Ye & J.X. Mao (1997) Popgene, the User-Friendly Sharewarefor Population Genetic Analysis. Molecular Biology and Biotechnology Centre, University of Alberta, Canada (program available from: http://www.ualberta.ca/~fyeh/).

See Also

sim2arlequin sim2bayescan sim2introgress sim2newhybrids sim2structure

Examples

## simulate F1 hybrids
F1hybrids<-hybridsim(Nmarker=100,Na=100,Nb=100,Nf1=30, type="neutral", hybrid="F1")

## convert to genepop input file
sim2popgene(F1hybrids,filename="F1hybrids_Popgene.txt")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(AFLPsim)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/AFLPsim/sim2popgene.Rd_%03d_medium.png", width=480, height=480)
> ### Name: sim2popgene
> ### Title: Converting hybridsim object to a PopGene input file
> ### Aliases: sim2popgene
> ### Keywords: hybridization simulation
> 
> ### ** Examples
> 
> ## simulate F1 hybrids
> F1hybrids<-hybridsim(Nmarker=100,Na=100,Nb=100,Nf1=30, type="neutral", hybrid="F1")
########Neutral hybridization########> 
> ## convert to genepop input file
> sim2popgene(F1hybrids,filename="F1hybrids_Popgene.txt")
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>