Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up.SD locked error using foverlaps after ordering by variable #2099
Comments
|
Solved by another person in our group by using .copy(.SD) instead of .SD. |
|
Glad that works, but maybe it is still a bug? The error cites using := or set on .SD, but you use neither. |
|
Bmerge is using set internally. I'm not sure if this is supposed to be the intended behavior. |
|
Ok. Well, fwiw, I don't think it should cause trouble; have posted a similar bug (?) over here: #1926 |
|
I'm inclined to agree. In any case, the error message is uninformative and confusing. |
|
Ha.. I think the locked attribute needs to be removed (IIRC all operations happen on shallow copied tables, and all reference operations are full column plonks). Will take a look. |
|
unlock shallow copy of .SD when needed in joins in j seems to have fixed this issue as well. The conversion of 'Chromosome' to
Thanks a lot for your great work with this issue! |
I am trying to sort out why some code from an existing R package (not my own code) runs fine on data.table version 1.9.4 but gives an error with later versions of data.table.
The code the package uses looks something like this, in which foverlaps is used to determine the overlap between a set of copy number segments and the corresponding probes (seg.cna represents the segments, and markers represents the probes):
Running this code in data.table > 1.9.4 gives the following error:
With the following traceback:
This seems similar to the error encountered in #1341, however the error we observe still persists in data.table >= 1.9.8. What seems to trigger the error is the following line in the above code (as without this line the example runs fine):
Any idea if this is related to the previous issue?