Skip to content

Support raw expressions in dcast(subset=) #4325#7789

Open
venom1204 wants to merge 3 commits into
masterfrom
issue43255
Open

Support raw expressions in dcast(subset=) #4325#7789
venom1204 wants to merge 3 commits into
masterfrom
issue43255

Conversation

@venom1204

Copy link
Copy Markdown
Contributor

closess #4325

updated the logic to allow the dcast to accept raw logical exprression in subset= in addition to the existing .() syntax for better consistency with base R subset().

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.85%. Comparing base (d65e46f) to head (0b5441f).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7789   +/-   ##
=======================================
  Coverage   98.85%   98.85%           
=======================================
  Files          87       87           
  Lines       17128    17133    +5     
=======================================
+ Hits        16932    16937    +5     
  Misses        196      196           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

No obvious timing issues in HEAD=issue43255
Comparison Plot

Generated via commit 554ef50

Download link for the artifact containing the test results: ↓ atime-results.zip

Task Duration
R setup and installing dependencies 6 minutes and 23 seconds
Installing different package versions 11 minutes and 57 seconds
Running and plotting the test cases 5 minutes and 23 seconds

@tdhock

tdhock commented Jun 12, 2026

Copy link
Copy Markdown
Member

thanks for this.
but why is this necessary?

dcast(DT, a ~ b, value.var="v", subset=a > 1)

below would be simpler:

dcast(DT[a>1], a ~ b, value.var="v")

isn’t that equivalent?

@venom1204

Copy link
Copy Markdown
Contributor Author

thanks for this. but why is this necessary?

dcast(DT, a ~ b, value.var="v", subset=a > 1)

below would be simpler:

dcast(DT[a>1], a ~ b, value.var="v")

isn’t that equivalent?

yah both are equivalent . my main intention was to improve the usability and consistency of teh existing subset= rather than add new functionality
since the subset= exists in dcast(), allowing expression like subset = a>1 makes its behaviour more intutive and consistent with the base r.
and also the backward compatibility is also maintained.

@tdhock

tdhock commented Jun 12, 2026

Copy link
Copy Markdown
Member

ok I guess but during gsoc I would suggest working on other issues that would have more benefit for users…

@venom1204

Copy link
Copy Markdown
Contributor Author

ok I guess but during gsoc I would suggest working on other issues that would have more benefit for users…

thanks ,got it ,i will take this into consideration next time .
Is there anything else I should do in this PR to improve it further?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants