I am trying to remove column but it removes from all other tables e.g. you see when I removed column from dd2 then it also removes column from dd1.
library("data.table")
dd1 <- mtcars
setDT(dd1)
dd2 <- dd1
dd2 <- dd2[,cyl:=NULL]
str(dd1)
str(dd2)
I can use dd2$cyl <- NULL but just trying to see there better option using data.table.