A Tutorial on Loops in R – Usage and Alternatives
In this easy-to-follow R tutorial on loops we will examine the constructs available in R for looping, and how to make use of R’s vectorization feature to perform your looping tasks more efficiently. We will present a few looping examples; then criticize and deprecate these in favor of the most popular vectorized alternatives (amongst the very many) available in the rich set of libraries that R offers.
Read more [first published on Datacamp on July 23, 2015]