run_sim_oldest: run oldest simulation of population and resistance change

Description Usage Arguments Value Examples

Description

initially accepts single arg values next get it to accept vectors by time

Usage

1
2
3
4
5
run_sim_oldest(num_tsteps = 20, pop_start = 0.5, resist_freq_start = 0.1,
  rate_growth = 0.2, carry_cap = 1, insecticide_kill = 0.2,
  resistance_modifier = 1, resist_incr = 0.2, resist_decr = 0.1,
  use_pyr = rep(1, num_tsteps), use_ddt = NA, use_ops = NA,
  use_car = NA, randomness = 0)

Arguments

num_tsteps

number of timesteps to run simulation

pop_start

start vector population

resist_freq_start

frequency of resistance at start, 0 to 1

rate_growth

population growth rate

carry_cap

carrying capacity (K) in the logistic model

insecticide_kill

kill rate due to insecticide

resistance_modifier

modifies effect of resistance

resist_incr

increase in resistance when correct insecticide present

resist_decr

decrease in resistance when correct insecticide absent

use_pyr

use pyrethroids NA for no, 1 for yes, or a vector e.g. c(NA,1) to give alternate use

use_ddt

use ddt see use_pyr

use_ops

use organophosphates see use_pyr

use_car

use carbamates see use_pyr

randomness

0-1 0=none, 1=maximum

Value

dataframe of simulation results

Examples

1
2
3
4
5
6
7
dF <- run_sim_oldest(pop_start=0.5, resist_freq_start=0.2, rate_growth=0.4, carry_cap=1, insecticide_kill=0.4, resistance_modifier=1)
#plot default run
plot_sim_oldest( run_sim_oldest())
#modify params
plot_sim_oldest( run_sim_oldest( insecticide_kill = 0.3, resist_incr = 0.05 ))
#alternate use of pyr
plot_sim_oldest( run_sim_oldest(use_pyr=c(NA,1)))

AndySouth/resistanceGame documentation built on May 5, 2019, 6:01 a.m.