init.popgensim: Initialise a spatial meta-population for a popgen simulation

Description Usage Arguments Details Value See Also Examples

Description

This functions initialises a time-forward, agent-based and spatiallly explicit genetic meta-population simulation

Usage

1
2
init.popgensim(n.pops, n.ind, sex.ratio, n.loci, n.allels, locs = NULL,
  n.cov = 3)

Arguments

n.pops

number of subpopulations

n.ind

number of individuals per subpopulation

sex.ratio

sex ratio of males and females

n.loci

number of loci

n.allels

number of maximal alleles per loci

locs

coordinates of the subpopulations, provided as a row named data.frame(x=, y=) with n.pops rows.[Only used to name the subpopulations by row.names(locs). If not provided subpopulations are simply numbered.

n.cov

number of covariates (currenlty do not change, defaults to 3. In future versions covariates such as age etc. will be implemented)

Details

To set up a population we have to specify the following parameters: n.pops defines the number of subpopulations and n.ind the number of individuals within subpopulations (carrying capacity). In the current implementaiton all subpopulations have the same number of individuals. sex.ratio determines the proportion of females in a subpopulation. finaly the number of loci and number of alleles need to be specified. locs is used to name the populations. For simplicity the names are provided via a data.frame of x and y coordinates (as they normally come from a genind object)

Value

a simpops object (to be used in run.popgensim ), which is a list of subpopulations. Each subpopulation consists of a data.frame with a row for each individual (coding the covariates and genetic make-up).

See Also

run.popgensim

Examples

1
init.popgensim(n.pops = 5, n.ind=8, sex.ratio = 0.25, n.loci = 4, n.allels = 7, n.cov = 3)


Search within the PopGenReport package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.