-
Notifications
You must be signed in to change notification settings - Fork 991
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
Error in update join when joining on factor #3559
Comments
idk how or why
|
Readability is in the eye of the beholder ;) But it's not "only" about readability; see e.g. the arguments for this kind of update join by @franknarf1 here. The idiom is also suggested by Arun here. |
unlock shallow copy of .SD when needed in joins in j seems to have fixed this issue as well.
Thanks a lot for your great work with this issue! |
I want to do an update join where I replace values in one data.table with values from another. For example, replace
NA
in 'd1' with values from 'd2':When joining on a
factor
variable 'fac', it errors:Same operation but joining on a
character
'char' works:Searched among the issues for the error and found .SD locked error using foverlaps after ordering by variable (exactly the same error) and .SD is locked for DT[, DT2[.SD]] joins (nearly the same error). The latter indeed looks similar, but it doesn't seem to be directly related to the
factor
vscharacter
issue described here.data.table_1.12.2
The text was updated successfully, but these errors were encountered: