Description Usage Arguments Details Value Examples
View source: R/set_exposure_rot.r
TODO could this be made generic to the resistance code too ? I suspect not. They do things quite differently. This just needs 1 insecticide at a time, so is : array_named(insecticide=1:n_insecticides, sex=c('m','f'), exposure=c('no','lo','hi') In resistance it is : array_named( sex=c('m','f'), niche1=c('0','a','A'), niche2=c('0','b','B') )
1 2 3 4 5 6 7 | set_exposure_rot(
n_insecticides = NULL,
expo_hi = 0.8,
expo_lo = 0,
male_expo_prop = 1,
plot = FALSE
)
|
n_insecticides |
number of insecticides, optional can just be specified by number of items in vector expo |
expo_hi |
exposure to insecticide in hi niche, either single or vector of 1 per insecticide |
expo_lo |
exposure to insecticide in lo niche, either single or vector of 1 per insecticide |
male_expo_prop |
proportion tht males are exposed relative to f, default 1, likely to be <1 (could possibly be a vector per insecticide) |
plot |
whether to plot exposure |
fills an array of exposure values
array of exposure values for the different insecticides
1 2 3 4 5 | a_exp <- set_exposure_rot( expo_hi=0.9 )
a_exp <- set_exposure_rot( expo_hi=c(0.5,0.9), male_expo_prop = 0.9)
#allowing array to be viewed differently
as.data.frame(a_exp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.