Most of the books I've read about R recommend that one try to use "vector operations" like x and y are vectors of equal length:
x + y
instead of:
for (i in 1:length(x)){
x[i] + y[i]
}
because x+y is suppose to be faster and walking through a for loop is not.
Why is that? how does this work and make it faster? as far as I can tell, R is only using one process and I can't understand why doing such a thing could be faster.