Consider this example
dt <- data.table(Test = c(200, 205), Min = c(100, 120), Max = c(200, 205))
dt[,Test %inrange% c(Min, Max)]
## [1] FALSE FALSE
Why am I getting FALSE for both? If I do just
200 %inrange% c(120, 205)
## [1] TRUE
I'm getting the desired output. Isn't inrange suppose to, and I quote ?inrange:
inrange checks whether each value in x is in between any of the intervals provided in lower,upper.
Consider this example
Why am I getting
FALSEfor both? If I do justI'm getting the desired output. Isn't
inrangesuppose to, and I quote?inrange: