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
cbindlist(X) would feel more data.table and provide the same functionality; even as a simple wrapper to setDT(unlist(X, recursive = FALSE)) this could be a nice convenience tool.
Not sure if there's any scope for further speedup under the hood as well.
Pretty neat! I don't think there's any concern for speed here.. But if one were to do cbindlist(X)[, col := new_val], then col from X would be updated as well. Probably documenting it would be sufficient..
Duly noted, always good to remind side effects of mutability.
Would it be possible for setDT to do this internally, i.e. for setDT(X) to work (and be equally by-reference as setDT(unlist(X, recursive = FALSE))? Does it make sense for setDT to become that flexible, if so?
Activity
arunsrinivasan commentedon Jan 20, 2018
Pretty neat! I don't think there's any concern for speed here.. But if one were to do
cbindlist(X)[, col := new_val], thencolfromXwould be updated as well. Probably documenting it would be sufficient..MichaelChirico commentedon Jan 20, 2018
Duly noted, always good to remind side effects of mutability.
Would it be possible for
setDTto do this internally, i.e. forsetDT(X)to work (and be equally by-reference assetDT(unlist(X, recursive = FALSE))? Does it make sense forsetDTto become that flexible, if so?(textproc/R-data.table) Updated 1.16.4 to 1.18.4, Fix build against 4…