Closed moodymudskipper closed 4 years ago
data.table assigns by reference (in place) when we mutate using := in j, and it doesn't when we transmute or summarize using .().
:=
j
.()
You can also do both transformations by reference and transformations which will create a copy, which result in surprising behavior.
A function receiving a data.table as an argument can modify its input in the calling environment if the user is not careful.
We avoid this and aim for more consistency.
data.table assigns by reference (in place) when we mutate using
:=
inj
, and it doesn't when we transmute or summarize using.()
.You can also do both transformations by reference and transformations which will create a copy, which result in surprising behavior.
A function receiving a data.table as an argument can modify its input in the calling environment if the user is not careful.
We avoid this and aim for more consistency.