View source: R/Population_getters.R
getAlleleFreqRun | R Documentation |
Get allele frequencies across a simulation run.
getAlleleFreqRun(pop)
pop |
a |
Retrieves the allele frequencies in each generation across a simulation run.
Returns a matrix of allele frequencies, one generation per row.
Dion Detterer, Paul Kwan, Cedric Gondro
runSim
# Construct a population with additive and epistatic effects pop <- Population( popSize = 200, map = map100snp, QTL = 20, alleleFrequencies = runif(100), broadH2 = 0.9, narrowh2 = 0.6, traitVar = 40 ) pop <- addEffects(pop) pop <- attachEpiNet(pop) # Run the simulator pop2 <- runSim(pop, generations = 150) af <- getAlleleFreqRun(pop2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.