Skip to content
Prev 78434 / 398502 Next

mapply for matrices

At the risk of being dense or R-ically incorrect, why do it without loops
when it is natural and easy to do it with them? More to the point:

1. vectorization speeds things up

2. apply commands are basically looping, not vectorization. Their advantage
is coding transparency, not speed

Flog me if you will ...

(of course constructs like sapply(index,function(index, A,b)...,A=A,b=b )
always work -- but why bother? )

-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
 
"The business of the statistician is to catalyze the scientific learning
process."  - George E. P. Box