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

How to group boxplot outliers in gnuplot -

cakephp - simple blog with croogo -