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

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -