This package simulates individual-based population genetic data in forward time.

#demography

In particular, it implements a set of functions that allow for a diverse set of demographies. These demographic conditions can change through time and include density-dependent and density-independent population regulation, extinction-recolonization dynamics. In addition, the within population demography can be simple to arbitrarily complex, the latter often needed when simulating complex management scenarios.

#genetics

Genetics in rmetasim allows large numbers of unlinked loci that evolve either through infinite allele or stepwise mutation models. In addition, sequence evolution is possible and as a consequence SNPs

#Notes for the newest version, 3 Version 3 of rmetasim implemented some significant changes to improve code quality and hopefully, usability.

- rmetasim is also available from github (https://github.com/stranda/rmetasim). If you want the latest version, install and load the 'devtools' package in your R session and then use “install_github("stranda/rmetasim”). On Windows, you will have to install Rtools first.

- The current version has eliminated the backend encoded output routines. These routines were accessed using “landscape.write.foreign”. Now only output to GenePop files remains. R based routines for population genetic data analysis are constantly improving and many can use the 'genind' format defined by the adegenet package. There is now a new function called “landscape.make.genind” which converts a landscape to a genind object. Please contact the maintainer about adding additional output formats.

- Several functions (landscape.amova.locus, landscape.locus, landscape.locus.states, landscape.mismatchdist, landscape.states) that access genetic information from landscapes had a strange order for parameters. That has been resolved to be the same as the rest of rmetasim, where the first argument is the landscape. If you have code that uses these and is based on rmetasim v<3.0, you will need to rearrange the parameters for these function calls, unless parameters were explicitly named in the calls. One consequence of this change is that 'magrittr'-style pipes work with rmetasim now (see the CreatingLandscapes vignette for some examples).