R: Find position of first value greater than X in a vector -


in r: have vector , want find position of first value greater 100.

# randomly generate suitable vector set.seed(0) v <- sample(50:150, size = 50, replace = true)  min(which(v > 100)) 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -