We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inrange
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
FALSE
200 %inrange% c(120, 205) ## [1] TRUE
I'm getting the desired output. Isn't inrange suppose to, and I quote ?inrange:
?inrange
inrange checks whether each value in x is in between any of the intervals provided in lower,upper.
The text was updated successfully, but these errors were encountered:
Maybe you need a list? dt[,Test %inrange% .(Min, Max)] # TRUE TRUE
dt[,Test %inrange% .(Min, Max)] # TRUE TRUE
I'm guessing it's just taking the first two elements from your vector, so c(100, 120) as bounds.
c(100, 120)
Sorry, something went wrong.
Yeah you are right. Thanks
No branches or pull requests
Consider this example
Why am I getting
FALSE
for both? If I do justI'm getting the desired output. Isn't
inrange
suppose to, and I quote?inrange
:The text was updated successfully, but these errors were encountered: