At any R Q&A site, you’ll frequently see an exchange like this one: Q: How can I use a loop to ? A: Don’t. Use one of the apply functions. So, what are these wondrous apply functions and how do they work? I think the best way to figure out anything in 




Zero Inflated Models and Generalized Linear Mixed Models with R.
Zuur, Saveliev, Ieno (2012).