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?
to your account
If we want to get the top five entries of a column, I guess the canonical approach is:
DT = data.table(A=sample(3, 10, TRUE),
B=sample(letters[1:3], 10, TRUE), C=sample(10))
But I've found in more general scenarios (for example, subsetting on the top five of C then performing some operations on other columns) the following approach to be useful :
However, this approach kills forder detection:
DT[order(C)[1:5], B, verbose = TRUE]
I guess it's easy to detect this and do forder and then subset.
The text was updated successfully, but these errors were encountered:
Lines 430 to 441
Sorry, something went wrong.
Closes #1921 -- order -> forder anywhere in i
Successfully merging a pull request may close this issue.