如何在R中没有副本的情况下将列添加到data.table

时间:2014-11-10 15:21:38

标签: r data.table

我正在使用

向data.table添加列
DT <- DT[ , c("x_next6_h", "x_last6_h", "x_h") :=
           lapply(.SD, function(x) x/100),
                   .SDcols = c("x_next6", "x_last6", "x") ]

但我认为这会复制DT的所有内容。

有没有办法以较少的开销进行这种转换?

0 个答案:

没有答案