Skip to content
Prev 256912 / 398506 Next

Find number of elements less than some number: Elegant/fast solution needed

This might be a bit quicker with larger vectors:

f <- function(x, y) sum(x > y)
vf <- Vectorize(f, "x")
vf(x, y)
On Thu, Apr 14, 2011 at 5:37 PM, Marc Schwartz <marc_schwartz at me.com> wrote: