Check which elements in a numeric vector are decreasing with respect to the previous elements

decreasing(x, k = 1, strict = TRUE)

Arguments

x

numeric vector

k

vector of lags (e.g., k=1:7 returns TRUE if an element is decreasing with respect to any of the previous 7 elements)

strict

logical indicating whether only strictly decreasing counts should be considered

Value

logical indicating decreasing elements