Loops in R
Overview
Teaching: 30 min
Exercises: 0 minQuestions
How can I do the same thing multiple times more efficiently in R?
What is vectorization?
Should I use a loop or an apply statement?
Objectives
understand loops types and create them
identify and perform vectorized operations
identify and understand when to use loops or vectorized operations
FIXME
Key Points
loops consume computer resources and should be used sparingly
R has vectorized operations to make classical looping operations faster