Some people have a hard time coming to terms with vectorization. If it is hard for you, you may be trying to make it more complicated than it is.
The essence of vectorization is simplicity. (There can be complicated ways to vectorize specific computations, but that should be considered as an aberration from the main point.)
If you are not getting it, relax and let it sink in slowly.
Resources
This includes a quick introduction to vectorization including the recycling rule.
Circles 3 and 4 give a more complete introduction to vectorization.
Back to top level of Impatient R
jun 25, 26
The function in question is scriptSearch. I’m not much for superlatives — ”most” and ”best” imply one dimension, but we live in a multi-dimensional world. I’m making an exception. The [...]
jun 25, 26
I recently gave a talk at the R in Finance conference in which I introduced the marketAgent package for R. Here is the source for the package if you'd like [...]
jun 25, 26
Executive summary Surprisingly good. And it’s not like my expectations were especially low. Structure There are 20 chapters. I mostly like the chapters and their order. Hadley breaks the 20 chapters [...]

