'Applying SIR model on small world networks

I'm trying to do code in R about applying SIR on random, small world and preferential attachment model but i failed to do it. Please anyone have any idea how can we do it and if epimodel and igraph packages are useful or not



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source