-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
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
potential issue with the between operator #3014
Comments
The syntax in your query is not correct.
Your query is
which evaluates to Maybe |
You want
And in the Examples:
Using Agree we could add a warning as a reminder... |
From the May 27 data.table reference manual, page 23, https://cloud.r-project.org/web/packages/data.table/data.table.pdf, emphasis mine:
You are right, list() does indeed work.
But if vectors, as in |
Thank you @MichaelChirico. I was responding to @franknarf1. Thank you both. |
You used the vector use case yourself in your issue:
I think maybe you're missing that by the time *Lazy evaluation means that we could technically spot this & fix it, but it's not really worth the effort. |
For those that quickly read to the end of this issue in future and just see Michael's last sentence "could ... but not worth the effort": Michael means auto-fixing isn't worth the effort; i.e. working out what the user really intended and doing it. I'd go even further and say requiring different syntax (list vs c) is clearer and more robust. Michael had already spent the time to make the PR (now merged) that auto-detects the user-error and gives a helpful message which explains the correct syntax, which seems the optimal way to solve the problem that data.table was silent about it. |
The between operator seems to not operate as intended:
My R session and data.table version:
Also tried:
The text was updated successfully, but these errors were encountered: