Description Usage Arguments Value Examples
A function that takes takes two copies of a network, one vaccinated and one unvaccinated
1 2 | compare_infections(unvac.network, vac.network, intervention, infection.steps,
random.seed)
|
unvac.network |
Network with no vaccinations |
vac.network |
Network with vaccinations |
intervention |
Vector of nodes representing vaccinated people |
infection.steps |
Number of steps that the infection will spread. |
List with the graph representation of the unvaccinated network [[1]], the vaccinated network [[2]], the infected index under no vaccination [[3]], and the infected index under vaccination [[4]].
1 2 3 4 5 6 7 8 | 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)
results2 <- compare_infections(net,vacNet,intervention,3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.