I process 100,000 rows in a for loop and collect the results with out <- c(out, value); a second loop builds a data frame with rbind one row at a time. Both take minutes. People keep saying "loops are slow in R, use the apply family".
Is the loop itself the problem? And what is the practical difference between lapply, sapply, vapply and apply when I rewrite this?




