It must have been around the year 2000, when I wrote my first snipped of SPLUS/R code. One thing I’ve learned back then: Loops are slow. Replace them with vectorized calculations or if vectorization is not possible, use sapply() et al. Since then, the R core team and the community …
Continue reading: Avoid loops in R! …