This is a very clear, but also very detailed explanation of the for, while, and repeat loops along with the concept of vectorization. A great resource for beginners.

Carlo Fanara. A Tutorial on Loops in R. DataCamp blog, September 26, 2016. Available at https://www.datacamp.com/community/tutorials/tutorial-on-loops-in-r.

This Blog post was added to the website on 2016-10-20 and was last modified on 2020-02-29. You can find similar pages at R software, Teaching resources.

An earlier version of this page appears here.