R/demo-population-simulation.R
demo_population_simulation.Rd
run several population simulations and visualize the result, refer to vignette('pgmcs')
for examples
demo_population_simulation(nrun, ngeneration, population, fitness, title)
integer scalar. Number of simulation runs.
integer scalar. Number of generations
integer vector. How many dominant homozygotes, heterozygotes, and recessive homozygotes do the initial population contain. For example, c(2, 5, 3)
means 2 AA, 5 Aa and 3 aa.
numeric vector. The fitness value of AA, Aa and aa. c(1, 1, 1)
means no natural selection.
string. Plot title.
an ggplot object
the underlying workhorse is population_simulation()
shiny::runApp(system.file('shiny', package = 'pgs'))