If I have a single vector, I can get the 1st occurrence which is below a value:
test <- c(0.5,0.8,0.1,0.08,0.06,0.04) which(test<0.1)[1]
Because I just stumbled upon this, here's another solution:
max.col(t(test2 < 5), "first")