I have a vector of numbers
f <- c(1, 3, 5, 8, 10, 12, 19, 27)
I want to compare the values in the vector to another number, and find the c
In a functional programming style:
f <- c(1, 3, 6, 8, 10, 12, 19, 27) x <- 18 Position(function(fi) fi <= x, f, right = TRUE)