Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
warning about invalid .internal.selfref detected on a data.tabe in a list #1908
Not sure this is a bug, but I am not expecting this warning. The following is how to replicate:
library(data.table) dt <- data.table(x=rexp(100),y=rep(LETTERS[1:10], 10)) dtL <- split(dt, by = "y") dtL[][, x2 := -x] Warning message: In `[.data.table`(dtL[], , `:=`(x2, -x)) : Invalid .internal.selfref detected and fixed by taking a (shallow) copy of the data.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.
By the way, I am using R 3.3.1 and the most recent data.table by following here https://github.com/Rdatatable/data.table/wiki/Installation
have you searched at all?
the trouble of data.tables in lists is well-reported. there are I think
On Nov 10, 2016 10:48 AM, "maverickg" email@example.com wrote: