Skip to content
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

[R-Forge #5595] setDT has broken internal.selfref when applied on a list #480

Closed
arunsrinivasan opened this issue Jun 8, 2014 · 0 comments
Assignees
Milestone

Comments

@arunsrinivasan
Copy link
Member

Submitted by: Eduard Antonyan; Assigned to: Nobody; R-Forge link

l = list(data.frame(a = 1), data.frame(a = 2))
lapply(l, setDT)
# [[1]]
#    a
#1: 1
# 
# [[2]]
#    a
#1: 2

l[[1]][, c := 2]
# Warning message:
# In `[.data.table`(l[[1]], , `:=`(c, 2)) :
#   Invalid .internal.selfref detected and fixed by taking a copy of the whole table so that := can add 
# this new column by reference. At an earlier point, this data.table has been copied by R (or been 
# created manually using structure() or similar). Avoid key<-, names<- and attr<- which in R currently 
# (and oddly) may copy the whole data.table. Use set* syntax instead to avoid copying: ?set, 
# ?setnames and ?setattr. Also, in R<=v3.0.2, list(DT1,DT2) copied the entire DT1 and DT2 (R's 
# list() used to copy named objects); please upgrade to R>v3.0.2 if that is biting. If this message 
# doesn't help, please report to datatable-help so the root cause can be fixed.
@arunsrinivasan arunsrinivasan added this to the v1.9.6 milestone Sep 24, 2014
@arunsrinivasan arunsrinivasan modified the milestones: v1.9.6, v1.9.8 Oct 10, 2014
@arunsrinivasan arunsrinivasan modified the milestones: v1.9.6, v1.9.8 Jan 28, 2015
@arunsrinivasan arunsrinivasan self-assigned this Jan 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant