Skip to content
Prev 63101 / 398500 Next

apply for nested lists

apply() statements **are** disguised loops and therefore are **not**
necessarily more efficient than explicit looping. Their principal advantage
is usually code readability. 

As another readability issue, note that x[[i]][[j]][[k]] can be abbreviated
to x[[c(i,j,k]].

I leave to others the pleasure of deciphering and improving your code,
however. 

-- 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