compute.frequency.evolution: Compute the evolution of the frequency of various genotype

Description Usage Arguments Value Examples

Description

Given a genome, this function simulate the evolution of the frequency of all the possible genotype that exist

Usage

1
2
compute.frequency.evolution(genome, initial.frequency = NULL,
  generations = 25)

Arguments

genome

A S4 object of the type genome

initial.frequency

The initial frequency of the various genotype. If NULL is given the initial frequencies will all be set to the same value

generations

The number of generation that have to be computed (including the first one)

Value

A matrix containing the frequencies of each genotype at each generation

Examples

1
2
3
4
locus1 = data.frame(allele1=c(1,1),allele2 = c(1,2),sd = c(0,1),fitness.male=c(1,1),fitness.female=c(1,1))
locus2 = data.frame(allele1=  c(1,1,2),allele2 = c(1,2,2),fitness.female = c(1,0.9,0.8),fitness.male = c(0.6,0.8,1))
genome = create.genome(locus1,locus2)
freqs <- compute.frequency.evolution(genome)

frederic-michaud/hapex documentation built on May 15, 2019, 3:29 p.m.