-
Notifications
You must be signed in to change notification settings - Fork 1k
add [[<- syntax #7424
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
base: master
Are you sure you want to change the base?
add [[<- syntax #7424
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7424 +/- ##
=======================================
Coverage 99.13% 99.13%
=======================================
Files 85 85
Lines 16618 16626 +8
=======================================
+ Hits 16474 16482 +8
Misses 144 144 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
No obvious timing issues in HEAD=assign_double_bracketse Generated via commit b0cf6d4 Download link for the artifact containing the test results: ↓ atime-results.zip
|
|
Could you explain the relationship to the bug? The discussion there wound up pointing to a documentation-only fix. |
|
|
||
| 23. `fread()` auto-detects separators for single-column files consisting solely of quoted values (e.g. `"this_that"\n"2025-01-01 00:00:01"`), [#7366](https://github.com/Rdatatable/data.table/issues/7366). Thanks @arunsrinivasan for the report and @ben-schwen for the fix. | ||
|
|
||
| 24. Assigning via `[[<-` now changes data.tables by reference, so forms like `DT[["col"]] = value` or `DT[[1, "col"]] = value` keep over-allocation intact instead of falling back to the data.frame method, [#6734](https://github.com/Rdatatable/data.table/issues/6734). Thanks @mb706 for the report and @ben-schwen for the implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we emphasize not doing this? 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we decide to do so than we should also advocate more on not using $, but I guess thats the charm of data.table. Your code, that you have written before simply works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the question is whether cedta() is sufficient to prevent cases where [[<- winds up being invoked by reference where the author intended it to use "normal" R copy-on-write behavior. $<-.data.table does copy(x).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but in any case $<- and [[<- shouldn't diverge in their behavior, right?
I saw the issue yesterday and it felt quite strange that the |

Closes #6734