continue_driver_process_sim | R Documentation |
The user specifies the rate at which drivers are introduced and the distribution the selective coefficients are drawn from.
Note that unlike in run_selection_sim
the drivers are allowed to stochastically die out.
The drivers at the specified rate with the gap between successive introductions exponentially distributed.
continue_driver_process_sim(insim, nyears, fitnessGen)
insim |
|
nyears |
|
final_division_rate |
|
target_pop_size |
|
drivers_per_year |
|
bForceReseed |
|
offset |
|
simpop object.
fitnessGen=function(){
trials=rexp(100,rate=30)
idx=which(trials>0.05)
if(length(idx)==0){
fitnessGen()
}else{
trials[idx[1]]
}
}
dps=run_driver_process_sim(0.1,1/(2*190),target_pop_size = 1e5,nyears = 30,fitness=fitnessGen,drivers_per_year = 5)
## Do stuff - subsample, plot trees etc and the restart to simulate the next 10 years:
dps2=continue_driver_process_sim(dps,40,fitnessGen = fitnessGen)
## Do stuff and simulation the next 10 years
dps2=continue_driver_process_sim(dps2,50,fitnessGen = fitnessGen)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.