Computation time of loops — for, *apply, map
It is usually said, that for– and while-loops should be avoided in R. I was curious about just how the different alternatives compare in terms of speed. The first loop is perhaps the worst I can think of – the return vector is initialized without type and length so that the ...
[Read more...]