Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upsplit.data.table does not preserve attributes #2047
Comments
|
This should automatically works once #995 will be resolved. |
|
Recent changes made by Matt in 3937881 solved this issue library(data.table)
dt=data.table(x=1:10)
setattr(dt, "a", 5)
attr(split(dt,rep(1:2,each=5))[[1]],"a")
#[1] 5
attr(split.data.frame(dt,rep(1:2,each=5))[[1]],"a")
#[1] 5 |
data.table 1.10.5, R 3.2.2.
split.data.frame preserves attributes from the original, but split.data.table drops them.