One of the benefits of using data.table is that it does not copy an existing data.table but rather references it like a pointer in C. I noticed that this behavior can mess up the original data set when calculating a stratified mean if doing so more than once. The command data.table::copy should break this link.
One of the benefits of using
data.table
is that it does not copy an existing data.table but rather references it like a pointer in C. I noticed that this behavior can mess up the original data set when calculating a stratified mean if doing so more than once. The commanddata.table::copy
should break this link.