Description Usage Arguments Details Value Examples
A function that takes takes two copies of a network, one vaccinated and one unvaccinated and test random infection in it.
1 2 | test_random_infections(unvac.network, vac.network, intervention, network.size,
infection.steps, random.samples)
|
unvac.network |
Network with no vaccinations |
vac.network |
Network with vaccinations |
intervention |
Vector of nodes representing vaccinated people |
network.size |
Number of nodes in the network. |
infection.steps |
Number of steps that the infection will spread. |
random.samples |
Vector of nodes that will be infected. |
For each random sample the infection will be simulated for a the specified amount of steps.
List with the number of infection in the unvaccinated network [[1]] and the vaccinated network [[2]].
1 2 3 4 5 6 7 8 9 | n=100
mat <- rgraph(n, mode = "graph", tprob = 0.5)
net <- network(mat, directed = FALSE)
results <- identify_vaccination_targets(igraph::betweenness,mat,n,5)
intervention <- results[[1]]
vaccinatedMat <- do.call(rbind,results[2])
vacNet <- network(vaccinatedMat, directed = FALSE)
seed <- sample.int(n,10,replace = TRUE)
results2 <- test_random_infections(net,vacNet,intervention,n,3,seed)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.