You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
setDT modifies the class of the origin data.frame #4784
At this point d2 is a shallow copy of d1, meaning they are not the same R object (although they point to the same columns). d2's class is data.table, as expected, but so is d1
setalloccol is what initiates the shallow copy. If the order of the rows were reversed, the class of only the current shallow copy (d2 in the example above) would be modified, as expected.
#Output of sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)
Matrix products: default
Activity
OfekShilon commentedon Nov 15, 2020
The fix I proposed doesn't work well with magrittr pipes :(
So I can't offer a solution, but the problem remains.
OfekShilon commentedon Nov 19, 2020
It seems setDT never worked well with magrittr pipes...
Fix Rdatatable#4784: setDT inside a function no longer modifies the c…
setDT generates shallow copy earlier to avoid interfering with attrib…