Skip to content
Prev 305851 / 398502 Next

effective way to return only the first argument of "which()"

The original method is faster than which.max for longish numeric vectors
(in R-2.15.1), but you should check time and memory usage on your
own machine:
user  system elapsed 
  11.64    1.05   12.70
user  system elapsed 
  16.38    2.94   19.35

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com