December 2017
Beginner to intermediate
470 pages
12h 29m
English
Vectorization means removing a manual looping mechanism in favor of an operation optimized to do the same thing without a need for an explicit loop. It is very helpful because it helps avoid the overhead incurred on by explicit loops in R. Vectorizing is a fundamental tool in R, and you should get used to programming using it instead of using explicit loops whenever possible, without waiting until a performance stage comes into play. Once you understand how it works, it will come naturally. A good read for this topic is Ross's blog post, Vectorization in R: Why? (http://www.noamross.net/blog/2014/4/16/vectorization-in-r--why.html).