zack holden: > I need to sort through a vector (x) and identify the point at which 2 successive values become smaller than the previous value. x <- c(5,5,7,6,5,4,3) a=c(diff(x, 1) < 0, FALSE) & c(diff(x, 2) < 0, FALSE, FALSE) a # FALSE FALSE TRUE TRUE TRUE FALSE FALSE which(a) # 3 4 5 Heikki Kaskelma