Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ rowwiseDT(

20. Fixed a memory issue causing segfaults in `forder`, [#6797](https://github.com/Rdatatable/data.table/issues/6797). Thanks @dkutner for the report and @MichaelChirico for the fix.

21. `setDT(get0('var'))` now correctly modifies `var` by reference, consistent with the long-standing behavior of `setDT(get('var'))`, [#6864](https://github.com/Rdatatable/data.table/issues/6864). Thanks to @rikivillalba for the report and @venom1204 for the fix.

### NOTES

1. There is a new vignette on joins! See `vignette("datatable-joins")`. Thanks to Angel Feliz for authoring it! Feedback welcome. This vignette has been highly requested since 2017: [#2181](https://github.com/Rdatatable/data.table/issues/2181).
Expand Down
2 changes: 1 addition & 1 deletion R/data.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -2982,7 +2982,7 @@ setDT = function(x, keep.rownames=FALSE, key=NULL, check.names=FALSE) {
} else if (.is_simple_extraction(name)) {
# common case is call from 'lapply()'
.reassign_extracted_table(name, x)
} else if (name %iscall% "get") { # #6725
} else if (name %iscall% c("get", "get0")) { # #6725
# edit 'get(nm, env)' call to be 'assign(nm, x, envir=env)'
name = match.call(get, name)
name[[1L]] = quote(assign)
Expand Down
9 changes: 9 additions & 0 deletions inst/tests/tests.Rraw
Original file line number Diff line number Diff line change
Expand Up @@ -21183,3 +21183,12 @@ test(2317.6, DT1[DF1, on='a', .(d = x.a + i.d)]$d, 5)
test(2317.7, DT1[DF2, on='a', e := i.e]$e, 5)
test(2317.8, DT1[DF2, on='a', e2 := x.a + i.e]$e2, 6)
test(2317.9, DT1[DF2, on='a', .(e = x.a + i.e)]$e, 6)

#6864
dt_get = data.frame(a = 1:3, b = letters[1:3])
setDT(get("dt_get"))
test(2319.1, !is.null(attr(dt_get, ".internal.selfref")))
Comment thread
MichaelChirico marked this conversation as resolved.
Outdated

Comment thread
MichaelChirico marked this conversation as resolved.
Outdated
dt_get0 = data.frame(a = 1:3, b = letters[1:3])
setDT(get0("dt_get0"))
test(2319.2, !is.null(attr(dt_get0, ".internal.selfref")))
Loading