attrition | R Documentation |
Samples individuals at random to remove from the population. The user supplies a probability for the individuals to be removed from the population.
attrition(pop, p)
pop |
an object of |
p |
the expected proportion of individuals that will be lost to attrition. |
an object of Pop-class
#Create founder haplotypes
founderPop = quickHaplo(nInd=100, nChr=1, segSites=10)
#Set simulation parameters
SP = SimParam$new(founderPop)
#Create population
pop = newPop(founderPop, simParam=SP)
#Lose an expected 5% of individuals
pop = attrition(pop, p=0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.