Description Usage Arguments Value Examples
View source: R/set_start_freqs.r
set_start_freqs allows starting allele frequencies to be set
1 2 3 4 5 6 | set_start_freqs(
n_insecticides = NULL,
max_gen = 200,
freqs = 0.001,
coverage = 0.5
)
|
n_insecticides |
number of insecticides, optional can just be specified by number of items in vector expo |
max_gen |
maximum number of mosquito generations to run the simulation |
freqs |
starting allele frequencies either one per insecticide or same for all in this version same for m,f,intervention & refuge |
coverage |
proportion of mosquitoes that are covered by the intervention, if coverage==1 no refuge |
array of allele frequencies with just first record filled
1 2 3 4 5 6 7 8 9 10 11 12 13 | #frequencies the same for all insecticides
RAF <- set_start_freqs(n=3, freqs=0.001)
RAF[,,,1] # to view generation 1
#frequencies different for each insecticide
RAF <- set_start_freqs(n=3, freqs=c(0.1,0.01,0.001))
RAF[,,,1] # to view generation 1
#testing mutliplying frequency arrays
RAF <- set_start_freqs(max_gen = 1, freqs=c(0.1,0.01,0.001))
RAF2 <- set_start_freqs(max_gen = 1, freqs=c(1,2,3))
RAF*RAF2
#allowing array to be viewed differently
as.data.frame(RAF)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.