loci.over.time: Allele frequency time series plots

Description Usage Arguments Value Author(s) Examples

Description

Plot allele frequency evolution over time for each locus, grouping by population color. This shows the difference between selection types and population colors.

Usage

1
loci.over.time(fr, pop.colors = pop.colors.default, generation = NULL, m = "Allele frequency evolution varies with selection type and population color", popsize.enc = NULL)

Arguments

fr

Data frame of simulated allele frequencies.

pop.colors

Colors to use to distinguish populations (blue, neutral, red)

generation

Generation to emphasize, or NULL for no emphasis.

m

Main title.

popsize.enc

Aesthetic to encode population size. lty or lwd work well. NULL means do not show population size.

Value

The ggplot2 plot.

Author(s)

Toby Dylan Hocking <toby.hocking@etu.upmc.fr>

Examples

1
2
3
4
5
6
library(nicholsonppp)
sim <- sim.drift.selection(s=0.5,generations=100)
df <- sim2df(sim)
df.i <- interesting.loci(df)
stopifnot(nrow(df.i)/nrow(df)*sim$p$n.locus==6)
loci.over.time(df.i)

nicholsonppp documentation built on May 2, 2019, 5:55 p.m.